: com.glide.script.fencing.MethodNotAllowedException: Function setUseEngines is not a allowed in scope xx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2020 03:33 PM
Hello expert,
we are receiving the below Errors seems setUseEngines is not accessible in scope xx
Evaluator.evaluateString() problem: com.glide.script.fencing.MethodNotAllowedException: Function setUseEngines is not allowed in scope xx
Is there any replacement for this or any suggestions?
Thanks in advance!
Meenal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2020 07:26 PM
Is this bound for the Application Store?
If so, you can't use the Global Script Include workaround mentioned, as that cannot be packaged as part of your application.
Is there scope to get the existing Data Policies converted to UI Policies?
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2020 08:03 PM
Hi Paul,
so in this case according to the comments they're are using setUseEngines(false) to avoid duplicate SLA creation.
Is there any other way to replace this in scope application?
var alertAlias = body.alias;
var note = body.workNotes;
var inc = new GlideRecord('incident');
inc.addQuery("x_alert_alias", alertAlias);
inc.addQuery('state','!=', 6);
inc.addQuery('state','!=', 7);
inc.addQuery('state','!=', 8);
inc.query();
if (inc.next()) {
inc.work_notes = note;
inc.setUseEngines(false);//Added to stop SLA Duplicate issue
inc.update();
gs.info("[Add Note To Incident] Processing finished.");
} else {
gs.error('[Add Note To Incident] Unable to find incident with x_alert_alias : ' + alertAlias);
}
Kindly suggest!
Thanks for the response.
Meenal