For those that don’t know, the ACE report is an automatically generated list of best practice violations. Only ServiceNow has the ability to run the report, and it’s often done at the end of a Professional Services project or before a ServiceNow Professional Services sales person meets with a client.
Because the ServiceNow ACE report is a relatively new entry into ServiceNow history, Few techs are aware of the standards, and even fewer initial implementations follow this set of best practices.
My goal here is to list out a very short set of rules to adhere to that will ensure your instance will pass the ACE report if and when it’s run. This is of course by no means intended to be a guarantee, and in fact I’ll leave out a handful of items that you’re unlikely to violate anyhow. That said, I do hope this list will get you off to great start.
Rules to Follow
- Integrations / Imports
- Coalesce fields in Transform Maps should be indexed.
In order to prevent performance bottlenecks on tables with large data sets, it’s important to index the columns that are used to identify unique records during import.
- “Run business rules” should be disabled on Transform Maps.
- LDAP Server should be set to only grab needed attributes.
- JDBC Data Sources should use the “Use last run datetime” option.
- SOAP getResponse() method is inefficient and should never be used.
- onBefore Scripts on Transform Maps shouldn’t insert or update records on other tables.
Take care of this in onAfter or ASYNC scripts instead.
- Coalesce fields in Transform Maps should be indexed.
- Client Scripts
- Client Scripts should be wrapped in functions.
Wrapping your scripts in a function helps prevent the global namespace from being polluted, this in turn reduces unpredictable behavior.
- All clients script functions should be used in an asynchronous manner.
- Look up on the Wiki how to use a callback function with getReference and GlideAjax.
- Avoid GlideRecord, even with a callback function. Instead create a Script Include that will return only the very specific information you need, and use GlideAjax to communicate with it.
- Do not use DOM manipulation.
While jQuery, Prototype, gel(), and getElementById are supported, they’re not recommended, and can break during upgrades of ServiceNow.
- Client Scripts should always check for g_form.isLoading() and exit the script.
- Global client scripts are never to be used. Use a UI Script when absolutely necessary instead.
- Client Scripts should not be left with an empty script field.
- Client Scripts should not contain hard-coded sys_ids.
- Client Scripts should be wrapped in functions.
- Business Rules / Script Includes
- Client Scripts and Business Rules should be wrapped in functions.
Wrapping your scripts in a function helps prevent the global namespace from being polluted, this in turn reduces unpredictable behavior.
- Global Business rules are never to be used.
These cause performance issues doing to always being included. Pretend they don’t exist, and use Script Includes instead.
- Never use “gr.getRowCount()”.
The getRowCount() method is very inefficient. Instead learn how to use GlideAggregate.
- Before Business Rules shouldn’t insert or update records on other tables.
Take care of this in onAfter or ASYNC business rules instead.
- Never use eval(). Ever.
- Scripts should not use hardcoded sys_ids. Instead use a system property to store the value.
- Client Scripts and Business Rules should be wrapped in functions.
- Navigation and UI Properties
- Modules to large tables should have a filter.
- User Preference for rows per page should be 20 or less.
- Rows per page options should be limited to 100 rows at most.
- Update on Iterate property should be disabled.
With this property on, as people use the up/down arrows to navigate through records, it would attempt to update the record every time, regardless of whether any changes were made.
- Go To search property should default to something other than “contains”. (Performance reasons.)
- Security
- High Security Plugin should be turned on.
- High Security should be set to Default Deny.
- Avoid current.update() in these situations:
- onBefore Scripts on Transform Maps
- Business Rules
- Workflow Script Activities
In all of these situations, there’s other, better ways to ensure that your information gets saved to the database.
- Debug Setup
- Console.log() should not be used in client scripts.
- Debug statements should be removed before code is pushed to production.
- SLA Logging level should be “notice”.
- Debug properties should be disabled in production.
- Errors occurring in Production instances should be under 10,000 per day.
- Domain Separation
- Admins should be in TOP domain, not global.
Categories: Developers, Scripting Tips
It’s worth noting that some Partners (such as Fruition Partners, do get in touch if you’d like to know more david.field@fruitionpartners.com) also have access to the ACE tool
LikeLike