<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: : com.glide.script.fencing.MethodNotAllowedException: Function setUseEngines is not a allowed in scope xx in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/com-glide-script-fencing-methodnotallowedexception-function/m-p/1836969#M493895</link>
    <description>&lt;P&gt;It makes sense for that API to be disallowed in an application scope.&lt;/P&gt;
&lt;P&gt;What is the reason for doing this in an application scope? Perhaps it would be more appropriate in Global?&lt;/P&gt;</description>
    <pubDate>Wed, 12 Aug 2020 00:22:28 GMT</pubDate>
    <dc:creator>paulmorris</dc:creator>
    <dc:date>2020-08-12T00:22:28Z</dc:date>
    <item>
      <title>: com.glide.script.fencing.MethodNotAllowedException: Function setUseEngines is not a allowed in scope xx</title>
      <link>https://www.servicenow.com/community/developer-forum/com-glide-script-fencing-methodnotallowedexception-function/m-p/1836961#M493887</link>
      <description>&lt;P&gt;Hello expert,&lt;/P&gt;
&lt;P&gt;we are receiving the below Errors seems&amp;nbsp;setUseEngines is not accessible in&amp;nbsp;scope xx&lt;/P&gt;
&lt;P&gt;Evaluator.evaluateString() problem: com.glide.script.fencing.MethodNotAllowedException: Function setUseEngines is not allowed in scope xx&lt;/P&gt;
&lt;P&gt;Is there any replacement for this or any suggestions?&lt;/P&gt;
&lt;P&gt;Thanks in advance!&lt;/P&gt;
&lt;P&gt;Meenal&lt;/P&gt;</description>
      <pubDate>Sun, 09 Aug 2020 22:33:43 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/com-glide-script-fencing-methodnotallowedexception-function/m-p/1836961#M493887</guid>
      <dc:creator>Meenal Gharat</dc:creator>
      <dc:date>2020-08-09T22:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: : com.glide.script.fencing.MethodNotAllowedException: Function setUseEngines is not a allowed in scope xx</title>
      <link>https://www.servicenow.com/community/developer-forum/com-glide-script-fencing-methodnotallowedexception-function/m-p/1836962#M493888</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;In scoped Application you need to use&amp;nbsp;&lt;A href="https://developer.servicenow.com/dev.do#!/reference/api/orlando/server/no-namespace/c_GlideEvaluatorScopedAPI" target="_blank" rel="noopener noreferrer nofollow"&gt;GlideScopedEvaluator()&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
&lt;P&gt;Sharjeel&lt;/P&gt;</description>
      <pubDate>Sun, 09 Aug 2020 22:42:06 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/com-glide-script-fencing-methodnotallowedexception-function/m-p/1836962#M493888</guid>
      <dc:creator>MrMuhammad</dc:creator>
      <dc:date>2020-08-09T22:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: : com.glide.script.fencing.MethodNotAllowedException: Function setUseEngines is not a allowed in scope xx</title>
      <link>https://www.servicenow.com/community/developer-forum/com-glide-script-fencing-methodnotallowedexception-function/m-p/1836963#M493889</link>
      <description>&lt;P&gt;Hi Meenal,&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://hi.service-now.com/kb_view.do?sysparm_article=KB0820691" rel="nofollow"&gt;https://hi.service-now.com/kb_view.do?sysparm_article=KB0820691&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Regards,&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Alok&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Aug 2020 22:57:51 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/com-glide-script-fencing-methodnotallowedexception-function/m-p/1836963#M493889</guid>
      <dc:creator>Alok Ranjan Das</dc:creator>
      <dc:date>2020-08-09T22:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: : com.glide.script.fencing.MethodNotAllowedException: Function setUseEngines is not a allowed in scope xx</title>
      <link>https://www.servicenow.com/community/developer-forum/com-glide-script-fencing-methodnotallowedexception-function/m-p/1836964#M493890</link>
      <description>&lt;P&gt;Some globally scoped methods are not allowed in application scopes for security reasons.&lt;/P&gt;
&lt;P&gt;Can you explain what you are trying to achieve so we can suggest an alternative API?&lt;/P&gt;
&lt;P&gt;Creating a Global script include that becomes a dependency on your scoped application as suggested by &lt;SN-MENTION class="sn-mention" table="live_profile" sysid="17af4e6ddb181fc09c9ffb651f961909"&gt;@Alok Das&lt;/SN-MENTION&gt;&amp;nbsp;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.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 00:50:54 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/com-glide-script-fencing-methodnotallowedexception-function/m-p/1836964#M493890</guid>
      <dc:creator>paulmorris</dc:creator>
      <dc:date>2020-08-10T00:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: : com.glide.script.fencing.MethodNotAllowedException: Function setUseEngines is not a allowed in scope xx</title>
      <link>https://www.servicenow.com/community/developer-forum/com-glide-script-fencing-methodnotallowedexception-function/m-p/1836965#M493891</link>
      <description>&lt;P&gt;Hi paul,&lt;/P&gt;
&lt;P&gt;Thanks for the reply.&lt;/P&gt;
&lt;P&gt;setUseEngines function used to ignore data policy updates.&lt;/P&gt;
&lt;P&gt;Can you suggest some other API for this?&lt;/P&gt;
&lt;P&gt;Thanks and Regards,&lt;/P&gt;
&lt;P&gt;Meenal&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 05:18:08 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/com-glide-script-fencing-methodnotallowedexception-function/m-p/1836965#M493891</guid>
      <dc:creator>Meenal Gharat</dc:creator>
      <dc:date>2020-08-10T05:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: : com.glide.script.fencing.MethodNotAllowedException: Function setUseEngines is not a allowed in scope xx</title>
      <link>https://www.servicenow.com/community/developer-forum/com-glide-script-fencing-methodnotallowedexception-function/m-p/1836966#M493892</link>
      <description>&lt;P&gt;Hi paul,&lt;/P&gt;
&lt;P&gt;this business rule is used to&amp;nbsp;Prevent Discovery set FQDN on Hostname&lt;/P&gt;
&lt;P&gt;var hn = current.host_name.toString();&lt;BR /&gt; var cn = hn.split('.');&lt;BR /&gt; var nm = cn[0];&lt;/P&gt;
&lt;P&gt;if(hn.contains('.')){&lt;BR /&gt; if(isNaN(nm) == true){&lt;BR /&gt; current.host_name = nm;&lt;BR /&gt; current.setUseEngines(false);&lt;BR /&gt; current.setWorkflow(false);&lt;BR /&gt; current.update();&lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 05:29:45 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/com-glide-script-fencing-methodnotallowedexception-function/m-p/1836966#M493892</guid>
      <dc:creator>Meenal Gharat</dc:creator>
      <dc:date>2020-08-10T05:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: : com.glide.script.fencing.MethodNotAllowedException: Function setUseEngines is not a allowed in scope xx</title>
      <link>https://www.servicenow.com/community/developer-forum/com-glide-script-fencing-methodnotallowedexception-function/m-p/1836967#M493893</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Create a SI in global scope and put this code there and then in the BR you can call&lt;/P&gt;
&lt;P&gt;new global.your_si_name().your_function();//current will be available in your SI so your code can work as is in SI.&lt;/P&gt;
&lt;P&gt;Kindly mark the comment as a correct answer if this has solved your problem.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 07:08:13 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/com-glide-script-fencing-methodnotallowedexception-function/m-p/1836967#M493893</guid>
      <dc:creator>asifnoor</dc:creator>
      <dc:date>2020-08-10T07:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: : com.glide.script.fencing.MethodNotAllowedException: Function setUseEngines is not a allowed in scope xx</title>
      <link>https://www.servicenow.com/community/developer-forum/com-glide-script-fencing-methodnotallowedexception-function/m-p/1836968#M493894</link>
      <description>&lt;P&gt;Hi asifnoor,&lt;/P&gt;
&lt;P&gt;Similarly we are using setUseEngine scripted REST API. where SetUseEngine is used to avoid Duplicate SLA. Can we do the same for this as well ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;below is our code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;var body = request.body.data;&lt;BR /&gt; &lt;BR /&gt; gs.info("[Add Note To Incident] Processing message: {alias=" + body.alias + ", note=" + body.workNotes + "}");&lt;BR /&gt; &lt;BR /&gt; var alertAlias = body.alias;&lt;BR /&gt; var note = body.workNotes;&lt;BR /&gt; &lt;BR /&gt; var inc = new GlideRecord('incident');&lt;BR /&gt; &lt;BR /&gt; inc.addQuery("x_alert_alias", alertAlias);&lt;BR /&gt; inc.addQuery('state','!=', 6);&lt;BR /&gt; inc.addQuery('state','!=', 7);&lt;BR /&gt; inc.addQuery('state','!=', 8);&lt;BR /&gt; inc.query();&lt;BR /&gt; &lt;BR /&gt; if (inc.next()) {&lt;BR /&gt; inc.work_notes = note;&lt;BR /&gt; &lt;BR /&gt; inc.setUseEngines(false);//Added to stop SLA Duplicate issue&lt;BR /&gt; inc.update();&lt;BR /&gt; gs.info("[Add Note To Incident] Processing finished.");&lt;BR /&gt; } else {&lt;BR /&gt; gs.error('[Add Note To Incident] Unable to find incident with x_alert_alias : ' + alertAlias);&lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;kindly suggest.&lt;/P&gt;
&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Meenal&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 09:14:06 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/com-glide-script-fencing-methodnotallowedexception-function/m-p/1836968#M493894</guid>
      <dc:creator>Meenal Gharat</dc:creator>
      <dc:date>2020-08-11T09:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: : com.glide.script.fencing.MethodNotAllowedException: Function setUseEngines is not a allowed in scope xx</title>
      <link>https://www.servicenow.com/community/developer-forum/com-glide-script-fencing-methodnotallowedexception-function/m-p/1836969#M493895</link>
      <description>&lt;P&gt;It makes sense for that API to be disallowed in an application scope.&lt;/P&gt;
&lt;P&gt;What is the reason for doing this in an application scope? Perhaps it would be more appropriate in Global?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 00:22:28 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/com-glide-script-fencing-methodnotallowedexception-function/m-p/1836969#M493895</guid>
      <dc:creator>paulmorris</dc:creator>
      <dc:date>2020-08-12T00:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: : com.glide.script.fencing.MethodNotAllowedException: Function setUseEngines is not a allowed in scope xx</title>
      <link>https://www.servicenow.com/community/developer-forum/com-glide-script-fencing-methodnotallowedexception-function/m-p/1836970#M493896</link>
      <description>&lt;P&gt;Hi paul,&lt;/P&gt;
&lt;P&gt;This is integration between SNOW and Third party that's the reason it is in Scoped Application.&lt;/P&gt;
&lt;P&gt;Thanks and Regards,&lt;/P&gt;
&lt;P&gt;Meenal&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 02:15:59 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/com-glide-script-fencing-methodnotallowedexception-function/m-p/1836970#M493896</guid>
      <dc:creator>Meenal Gharat</dc:creator>
      <dc:date>2020-08-12T02:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: : com.glide.script.fencing.MethodNotAllowedException: Function setUseEngines is not a allowed in scope xx</title>
      <link>https://www.servicenow.com/community/developer-forum/com-glide-script-fencing-methodnotallowedexception-function/m-p/1836971#M493897</link>
      <description>&lt;P&gt;Is this bound for the Application Store?&lt;/P&gt;
&lt;P&gt;If so, you can't use the Global Script Include workaround mentioned, as that cannot be packaged as part of your application.&lt;BR /&gt;&lt;BR /&gt;Is there scope to get the existing Data Policies converted to UI Policies?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 02:26:47 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/com-glide-script-fencing-methodnotallowedexception-function/m-p/1836971#M493897</guid>
      <dc:creator>paulmorris</dc:creator>
      <dc:date>2020-08-12T02:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: : com.glide.script.fencing.MethodNotAllowedException: Function setUseEngines is not a allowed in scope xx</title>
      <link>https://www.servicenow.com/community/developer-forum/com-glide-script-fencing-methodnotallowedexception-function/m-p/1836972#M493898</link>
      <description>&lt;P&gt;Hi Paul,&lt;/P&gt;
&lt;P&gt;so in this case according to the comments they're are using&amp;nbsp;&lt;STRONG&gt;setUseEngines(false)&amp;nbsp;&lt;/STRONG&gt;to avoid duplicate SLA creation.&lt;/P&gt;
&lt;P&gt;Is there any other way to replace this in scope application?&lt;/P&gt;
&lt;P&gt;var alertAlias = body.alias;&lt;BR /&gt;var note = body.workNotes;&lt;BR /&gt;&lt;BR /&gt;var inc = new GlideRecord('incident');&lt;BR /&gt;&lt;BR /&gt;inc.addQuery("x_alert_alias", alertAlias);&lt;BR /&gt;inc.addQuery('state','!=', 6);&lt;BR /&gt;inc.addQuery('state','!=', 7);&lt;BR /&gt;inc.addQuery('state','!=', 8);&lt;BR /&gt;inc.query();&lt;BR /&gt;&lt;BR /&gt;if (inc.next()) {&lt;BR /&gt;inc.work_notes = note;&lt;BR /&gt;&lt;BR /&gt;inc.setUseEngines(false);//Added to stop SLA Duplicate issue&lt;BR /&gt;inc.update();&lt;BR /&gt;gs.info("[Add Note To Incident] Processing finished.");&lt;BR /&gt;} else {&lt;BR /&gt;gs.error('[Add Note To Incident] Unable to find incident with x_alert_alias : ' + alertAlias);&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kindly suggest!&lt;/P&gt;
&lt;P&gt;Thanks for the response.&lt;/P&gt;
&lt;P&gt;Meenal&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 03:03:17 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/com-glide-script-fencing-methodnotallowedexception-function/m-p/1836972#M493898</guid>
      <dc:creator>Meenal Gharat</dc:creator>
      <dc:date>2020-08-12T03:03:17Z</dc:date>
    </item>
  </channel>
</rss>

