: com.glide.script.fencing.MethodNotAllowedException: Function setUseEngines is not a allowed in scope xx

Meenal Gharat
Giga Guru

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

11 REPLIES 11

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

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