New client-scripts are run in strict mode, with direct DOM access disabled. Access to jQuery, prototype and the window object are likewise disabled. To disable this on a per-script basis, configure this form and add the "Isolate script" field. To dis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2019 08:50 AM
I'm getting this error in my Dev instance and it's on London. I've set the glide.script.block.client.globals to false and it's still not working. My Prod instance is on Kingston and it works correctly. We have to upgrade Prod soon and would like someone to take a look at my code and see if they can help me update it.
Here is my code.
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading)
return;
var ga = new GlideAjax('pattCiCheck');
ga.addParam('sysparm_name', 'getCiSupportGroup');
ga.addParam('sysparm_ci', newValue);
//alert(g_form.getValue('cmdb_ci'));
//ga.addParam('sysparm_ag', g_form.getValue('assignment_group'));
//alert(g_form.getValue('assignment_group'));
ga.getXML(doAlert); // Always try to use asynchronous (getXML) calls rather than synchronous (getXMLWait)
}
// Callback function to process the response returned from the server
function doAlert(response) {
var answer = response.responseXML.documentElement.getAttribute("answer");
var answers = answer.split(',');
if (answer != '')
g_form.setValue("variables.software_owner", answers[0]);
g_form.setValue("license_type", answers[1]); // Change accordingly
g_form.setValue("ad_group_name", answers[2]);
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2019 11:00 AM
Did you add the Isolate script (field) checkbox to the client script form and uncheck it? I'm assuming you wrote this script in your London version.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2019 06:31 AM
No it was written for Kingston version. When we upgraded to London our Dev instance stop working for this catalog item.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2019 11:09 AM
Hello John,
Check out this blog about your query:
1.Uncheck Isolated SCript field: First configure form layout and add field
2. Modfied Code
g_form.setValue("software_owner", answers[0]);
g_form.setValue("license_type", answers[1]); // Change accordingly
g_form.setValue("ad_group_name", answers[2]);
Please mark as Correct Answer/Helpful, if applicable.
Thanks!
Abhishek Gardade
Abhishek Gardade
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2020 06:48 AM
Hi,
I am getting same error. I am working on ServiceNow New York version. I added property and uncheck "Isolate script" field value. but still client script is not working. please suggest me solution.