Skip to main content

ServiceNow RITMs loading slow

 Although in our case the root cause was a "dodgy" business rule in the development environment which we managed to resolve, nevertheless the answer from ServiceNow Support was an interesting one worth noting:

Thanks for the patience while I was checking further on the issue.

Issue:
Request items records take ages when attempting to open them

STR:
1. IN '*****dev' instance go to sc_req_item table
2. Observe it will take forever to open record.


MOST PROBABLE CAUSE:
The reason that the list view of table sc_req_item is loading very slow is actually due to the column "Stage" of the list. This is because of stage field type is 'workflow'.
When the type is workflow for stage column ,it is represented in graphical way.
The query to generate the workflow stage icons is more expensive in terms of database performance than if a single keyword is displayed to render their stage.

SOLUTION PROPOSED:
1)To solve the issue ,stage field type should be changed from workflow to string.
2)Goto Dictionary application in navigation and select sc_req_item table and stage column.
3)Change the type from Workflow to string
4)Save the form.
5)After performing the above change sc_req_item.LIST will be opened within few seconds.
6)If the stage field cannot be changed globally then remove stage field from list layout of sc_req_item table.

Please refer below knowledge article for reference:
Modifying 'Workflow Stage' field from Graphical to Text:

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0635119



The reason why it is causing issue when opening manually created RITMs is that it does not have any stage associated.
It is not a correct way to create RITM.

Next Steps:
Please review above information, hope it answers your query. Feel free to update for any query or concern.

 (ServiceNow )

 

(ServiceNow )

Comments

Popular posts from this blog

ServiceNow check for null or nil or empty (or not)

Haven't tested these all recently within global/local scopes, so feel free to have a play! option 1 use an encoded query embedded in the GlideRecord , e.g.  var grProf = new GlideRecord ( 'x_cls_clear_skye_i_profile' ); grProf . addQuery ( 'status=1^ owner=NULL ' ); grProf . query (); even better use the glideRecord  addNotNullQuery or addNullQuery option 2 JSUtil.nil / notNil (this might be the most powerful. See this link ) example: if ( current . operation () == 'insert' && JSUtil . notNil ( current . parent ) && ! current . work_effort . nil ())  option 3 there might be times when you need to get inside the GlideRecord and perform the check there, for example if the code goes down 2 optional routes depending on null / not null can use gs.nil : var grAppr = new GlideRecord ( 'sysapproval_approver' ); var grUser = new GlideRecord ( 'sys_user' ); if ( grUser . get ( 'sys_id' , current . approver )){

Get URL Parameter - server side script (portal or classic UI)

Classic UI : var sURL_editparam = gs . action . getGlideURI (). getMap (). get ( ' sysparm_aparameter ' ); if ( sURL_editparam == 'true' ) { gs . addInfoMessage ( 'parameter passed ); } Portal : var sURL_editparam = $sp . getParameter ( " sysparm_aparameter " ); if ( sURL_editparam == 'true' ) { gs . addInfoMessage ( 'parameter passed ); }