Notifications

214 views

Description

In NY: When the order of variable set client script is more than that of the normal catalog client script, the service portal fails to honor the order of execution of the scripts (works fine in platform): In portal, variable set client script still executes before normal catalog client script
In London: When the order of variable set client script is more than that of the normal catalog client scrip, the service portal executes the catalog client script followed by the variable set client script

Steps to Reproduce

1. Go to any NY instance (e.g. rammatador)
2. Create a catalog item and add it to a catalog and category for ease of access (or use Ram test on rammatador instance)
3. Create a new variable set under the item
4. Create an on load client script under the variable set and set ite order to 100 with the below script in it:

function onLoad() {
//Type appropriate comment here, and begin script below
g_form.addInfoMessage("from Variable client script");
}

5. Now, create an on load catalog client script on the item with order 200, with below script

function onLoad() {
//Type appropriate comment here, and begin script below
g_form.addInfoMessage("from normal catalog client script one");
}

6. Open the item item in platform and portal

Observed: (This is same as expected)
On platform, you see the below messages appear:
from Variable client script
from normal catalog client script one

On portal:
from Variable client script
from normal catalog client script one

7. Now, go back to the variable set and change the order of the on load client script (created in step 4) to 300 (or higher so that it is more than that of the catalog client script) and open the item again in platform and portal.

Observed : (not expected)
On platform, you see the below messages appear:
from normal catalog client script one
from Variable client script

On portal :
from Variable client script
from normal catalog client script one

(the order of execution does not change)

8. Go to a London instance (ramjilondonwale; item: Ram Test) and repeat steps 1 through 7

Observed: The client script (irrespective of it being catalog client script or associated to a variable set) with higher order executes later, the same is reflected in the messages that appear

Workaround

The workaround for the problem is to create a system property to disable the catalog client scripts. The catalog client scripts caching is a new feature added from New York to improve the performance. Previous to NY, we did not cache the scripts. So disabling the cache will have only minimal performance impact.Below are the steps to disable the catalog client scripts cache:

1)Go to sys_properties.LIST
2)Click on new and enter the below values in the new system property form
Name: glide.cache.disabled.catalog_client_scripts_ng
Type: true/false
Value: true
and submit

3) Go to Background script and flush the cache from all nodes

gs._cacheFlush();


Related Problem: PRB1380844

Seen In

New York Patch 4
SR - IRM - GRC Profiles - Madrid 2019 Q2
SR - IRM - Policy and Compliance - Madrid 2019 Q2
SR - IRM - Risk Management - New York 2019 Q3
SR - ITBM - Agile 2.0 Dashboards v1.0
SR - ITBM - Scrum Dashboards Common v1.0
SR - ITOM - CMDB CI Class Models - 201908
SR - ITOM - CMDB CI Class Models - 201909
SR - ITOM - Discovery and Service Mapping - 201908
SR - ITOM - Discovery and Service Mapping - v1.0.35
SR - SecOps - Configuration Compliance - New York 2019 Q3
SR - Security - Integration Framework - Madrid 2019 Q2
SR - Security - Support Common - Madrid 2019 Q2
SR - Security - Support Orchestration - Madrid 2019 Q2
SR - SIR - RecordedFuture Integration - New York 2019 Q3
SR - SIR - Security Incident Response - Madrid 2019 Q2
SR - SIR - Security Incident Response PA Content - New York 2019 Q3
SR - SIR - Store SecOps Setup Assistant - Madrid 2019 Q2
SR - SIR - Store Threat Core - Madrid 2019 Q2
SR - SIR - Store Trusted Security Circles Client - New York 2019 Q3
SR - SIR - Threat intelligence - New York 2019 Q3
SR - SIR - VirusTotal Integration - New York 2019 Q3
SR - SIR - WHOIS Integration - New York 2019 Q3
SR - VR - Qualys - New York 2019 Q3
SR - VR - Rapid7 - London 2019 Q2 v.6.2.1
SR - VR - Vulnerability Response - New York 2019 Q3
SR - VR - Vulnerability Response PA Content - Madrid 2019 Q2

Intended Fix Version

New York Patch 8
Paris

Fixed In

Orlando Patch 2

Safe Harbor Statement

This "Intended Fix Version" information is meant to outline ServiceNow's general product direction and should not be relied upon in making a purchasing decision. The information provided here is for information purposes only and may not be incorporated into any contract. It is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. The development, release, and timing of any features or functionality described for our products remains at ServiceNow's sole discretion.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2020-03-27 09:47:06
Published:2020-03-19