: 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

MrMuhammad
Giga Sage

Hi,

In scoped Application you need to use GlideScopedEvaluator()

Thanks & Regards,

Sharjeel

Regards,
Muhammad

Alok Das
Tera Guru

Hi Meenal,

Could you please give a try by cresting a script include in global scope and try to invoke the script as mentioned in the below HI link.

https://hi.service-now.com/kb_view.do?sysparm_article=KB0820691

Regards,

Alok

The SN Nerd
Giga Sage
Giga Sage

Some globally scoped methods are not allowed in application scopes for security reasons.

Can you explain what you are trying to achieve so we can suggest an alternative API?

Creating a Global script include that becomes a dependency on your scoped application as suggested by @Alok Das can be considered a workaround, but I would advise caution. I would see this as a bad design choice as it somewhat defeats the purpose of developing in application scope and in my view should only be undertaken as a last resort.


ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

Hi paul,

Thanks for the reply.

setUseEngines function used to ignore data policy updates.

Can you suggest some other API for this?

Thanks and Regards,

Meenal