<?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 gs.getUser().isMemberOf(current.assignment_group) not working in ITSM forum</title>
    <link>https://www.servicenow.com/community/itsm-forum/gs-getuser-ismemberof-current-assignment-group-not-working/m-p/685475#M257254</link>
    <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I write :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;gs.getUser().isMemberOf(current.assignment_group)&lt;/STRONG&gt; in my ACL , elow Error is encountered in logs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #343d47; font-size: 13px; font-family: SourceSansPro, 'Helvetica Neue', Arial;"&gt;java.lang.RuntimeException: failed to coerce com.glide.script.fencing.ScopedGlideElement to desired type java.lang.String&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #343d47; font-size: 13px; font-family: SourceSansPro, 'Helvetica Neue', Arial;"&gt;Caused by error in Access Control: 'x_mkgaa_non_confor_non_conformance_tasks.assigned_to' at line 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #343d47; font-size: 13px; font-family: SourceSansPro, 'Helvetica Neue', Arial;"&gt;1: &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #343d47; font-size: 13px; font-family: SourceSansPro, 'Helvetica Neue', Arial;"&gt;==&amp;gt; 2: if(gs.getUser().isMemberOf(current.assignment_group)) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #343d47; font-size: 13px; font-family: SourceSansPro, 'Helvetica Neue', Arial;"&gt;3: { &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #343d47; font-size: 13px; font-family: SourceSansPro, 'Helvetica Neue', Arial;"&gt;4: gs.info("groupppppp name okkk"); &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #343d47; font-size: 13px; font-family: SourceSansPro, 'Helvetica Neue', Arial;"&gt;5: answer=true; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #343d47; font-family: SourceSansPro, 'Helvetica Neue', Arial; font-size: 13px;"&gt;Can anyone please help me with the solution for this .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #343d47; font-family: SourceSansPro, 'Helvetica Neue', Arial; font-size: 13px;"&gt;Mine is the&lt;/SPAN&gt;&lt;STRONG style="color: #343d47; font-size: 13px; font-family: SourceSansPro, 'Helvetica Neue', Arial;"&gt; SCOPED APPLICATION.&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Dec 2017 06:38:03 GMT</pubDate>
    <dc:creator>pgrover</dc:creator>
    <dc:date>2017-12-20T06:38:03Z</dc:date>
    <item>
      <title>gs.getUser().isMemberOf(current.assignment_group) not working</title>
      <link>https://www.servicenow.com/community/itsm-forum/gs-getuser-ismemberof-current-assignment-group-not-working/m-p/685475#M257254</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I write :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;gs.getUser().isMemberOf(current.assignment_group)&lt;/STRONG&gt; in my ACL , elow Error is encountered in logs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #343d47; font-size: 13px; font-family: SourceSansPro, 'Helvetica Neue', Arial;"&gt;java.lang.RuntimeException: failed to coerce com.glide.script.fencing.ScopedGlideElement to desired type java.lang.String&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #343d47; font-size: 13px; font-family: SourceSansPro, 'Helvetica Neue', Arial;"&gt;Caused by error in Access Control: 'x_mkgaa_non_confor_non_conformance_tasks.assigned_to' at line 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #343d47; font-size: 13px; font-family: SourceSansPro, 'Helvetica Neue', Arial;"&gt;1: &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #343d47; font-size: 13px; font-family: SourceSansPro, 'Helvetica Neue', Arial;"&gt;==&amp;gt; 2: if(gs.getUser().isMemberOf(current.assignment_group)) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #343d47; font-size: 13px; font-family: SourceSansPro, 'Helvetica Neue', Arial;"&gt;3: { &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #343d47; font-size: 13px; font-family: SourceSansPro, 'Helvetica Neue', Arial;"&gt;4: gs.info("groupppppp name okkk"); &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #343d47; font-size: 13px; font-family: SourceSansPro, 'Helvetica Neue', Arial;"&gt;5: answer=true; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #343d47; font-family: SourceSansPro, 'Helvetica Neue', Arial; font-size: 13px;"&gt;Can anyone please help me with the solution for this .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #343d47; font-family: SourceSansPro, 'Helvetica Neue', Arial; font-size: 13px;"&gt;Mine is the&lt;/SPAN&gt;&lt;STRONG style="color: #343d47; font-size: 13px; font-family: SourceSansPro, 'Helvetica Neue', Arial;"&gt; SCOPED APPLICATION.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 06:38:03 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/gs-getuser-ismemberof-current-assignment-group-not-working/m-p/685475#M257254</guid>
      <dc:creator>pgrover</dc:creator>
      <dc:date>2017-12-20T06:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: gs.getUser().isMemberOf(current.assignment_group) not working</title>
      <link>https://www.servicenow.com/community/itsm-forum/gs-getuser-ismemberof-current-assignment-group-not-working/m-p/685476#M257255</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I just replied to your other thread. Use &lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG style="color: #343d47; font-size: 13px; font-family: SourceSansPro, 'Helvetica Neue', Arial;"&gt;gs.getUser().isMemberOf(current.assignment_group.toString())&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG style="color: #343d47; font-size: 13px; font-family: SourceSansPro, 'Helvetica Neue', Arial;"&gt;OR&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG style="color: #343d47; font-size: 13px; font-family: SourceSansPro, 'Helvetica Neue', Arial;"&gt;&lt;STRONG style="color: #343d47; font-size: 13px; font-family: SourceSansPro, 'Helvetica Neue', Arial;"&gt;gs.getUser().isMemberOf(current.assignment_group.sys_id+'')&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Dec 2017 06:49:26 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/gs-getuser-ismemberof-current-assignment-group-not-working/m-p/685476#M257255</guid>
      <dc:creator>Kannan Nadar</dc:creator>
      <dc:date>2017-12-20T06:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: gs.getUser().isMemberOf(current.assignment_group) not working</title>
      <link>https://www.servicenow.com/community/itsm-forum/gs-getuser-ismemberof-current-assignment-group-not-working/m-p/685477#M257256</link>
      <description>&lt;P&gt;Try below instead&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: SourceSansPro, 'Helvetica Neue', Arial; color: #343d47;"&gt;if(gs.getUser().isMemberOf(current.assignment_group.toString()))&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: SourceSansPro, 'Helvetica Neue', Arial; color: #343d47;"&gt;OR&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: SourceSansPro, 'Helvetica Neue', Arial; color: #343d47;"&gt;&lt;STRONG style="font-size: 13px; font-family: SourceSansPro, 'Helvetica Neue', Arial; color: #343d47;"&gt;if(gs.getUser().isMemberOf(current.assignment_group.name))&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Dec 2017 06:52:11 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/gs-getuser-ismemberof-current-assignment-group-not-working/m-p/685477#M257256</guid>
      <dc:creator>Gurpreet07</dc:creator>
      <dc:date>2017-12-20T06:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: gs.getUser().isMemberOf(current.assignment_group) not working</title>
      <link>https://www.servicenow.com/community/itsm-forum/gs-getuser-ismemberof-current-assignment-group-not-working/m-p/685478#M257257</link>
      <description>&lt;P&gt;Hello everyone ,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I got my answer .&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Actually &lt;STRONG style="font-size: 13px; font-family: SourceSansPro, 'Helvetica Neue', Arial; color: #343d47;"&gt;gs.getUser().isMemberOf doesnot work in SCOPED APPLICATION.&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: SourceSansPro, 'Helvetica Neue', Arial; color: #343d47;"&gt;Please refer the lonk:&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: SourceSansPro, 'Helvetica Neue', Arial; color: #343d47;"&gt;&lt;A href="https://docs.servicenow.com/bundle/kingston-security-management/page/product/secops-integration-qualys-vulnerability/concept/advanced-modifications.html" title="https://docs.servicenow.com/bundle/kingston-security-management/page/product/secops-integration-qualys-vulnerability/concept/advanced-modifications.html"&gt;Configure the ServiceNow-initiated Qualys IP scan&lt;/A&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I implemeted their script and it worked. &lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Dec 2017 06:54:52 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/gs-getuser-ismemberof-current-assignment-group-not-working/m-p/685478#M257257</guid>
      <dc:creator>pgrover</dc:creator>
      <dc:date>2017-12-20T06:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: gs.getUser().isMemberOf(current.assignment_group) not working</title>
      <link>https://www.servicenow.com/community/itsm-forum/gs-getuser-ismemberof-current-assignment-group-not-working/m-p/685479#M257258</link>
      <description>&lt;P&gt;Hi Prerna,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;As I understand there is a lot of issuses with the gs.getUser()... etc. in scoped apps. gs.getUserID() should work, so sadly I think you need to just do a normal GlideRecord query with that and fetch the info through it.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;U can always do something like&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;var gr = new GlideRecord('sys_user_grmember');&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;gr.addQuery('group',current.assignment_group);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;gr.addQuery('user', gs.getUserID());&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;gr.query();&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;if(gr.hasNext() {&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;answer = true;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;}&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Dec 2017 07:10:43 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/gs-getuser-ismemberof-current-assignment-group-not-working/m-p/685479#M257258</guid>
      <dc:creator>Goran WitchDoc</dc:creator>
      <dc:date>2017-12-20T07:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: gs.getUser().isMemberOf(current.assignment_group) not working</title>
      <link>https://www.servicenow.com/community/itsm-forum/gs-getuser-ismemberof-current-assignment-group-not-working/m-p/685480#M257259</link>
      <description>&lt;P&gt;Yes , thanks for the reply .&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I implemented this solution only from the above link posted by me .&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Dec 2017 07:28:35 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/gs-getuser-ismemberof-current-assignment-group-not-working/m-p/685480#M257259</guid>
      <dc:creator>pgrover</dc:creator>
      <dc:date>2017-12-20T07:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: gs.getUser().isMemberOf(current.assignment_group) not working</title>
      <link>https://www.servicenow.com/community/itsm-forum/gs-getuser-ismemberof-current-assignment-group-not-working/m-p/685481#M257260</link>
      <description>&lt;PRE class="language-javascript"&gt;&lt;CODE&gt; gs.getUser().isMemberOf(current.assignment_group.getDisplayValue())&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;This is working for me in a Scoped App, as a condition on a UI Action&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jul 2020 17:47:39 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/gs-getuser-ismemberof-current-assignment-group-not-working/m-p/685481#M257260</guid>
      <dc:creator>hunter_phillips</dc:creator>
      <dc:date>2020-07-20T17:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: gs.getUser().isMemberOf(current.assignment_group) not working</title>
      <link>https://www.servicenow.com/community/itsm-forum/gs-getuser-ismemberof-current-assignment-group-not-working/m-p/685482#M257261</link>
      <description>&lt;P&gt;Please note that you never want to use code like:&lt;/P&gt;
&lt;PRE class="language-markup"&gt;&lt;CODE&gt;current.assignment_group.sys_id&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Instead do this:&lt;/P&gt;
&lt;PRE class="language-markup"&gt;&lt;CODE&gt;current.getValue( 'assignment_group' )&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Dot walking to a 'sys_id' actually LOOKS UP the 'assignment_group' by 'sys_id' only for the record to be used to return the 'sys_id'.&amp;nbsp; It is a completely wasted lookup.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2021 23:29:59 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/gs-getuser-ismemberof-current-assignment-group-not-working/m-p/685482#M257261</guid>
      <dc:creator>davidnia</dc:creator>
      <dc:date>2021-09-23T23:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: gs.getUser().isMemberOf(current.assignment_group) not working</title>
      <link>https://www.servicenow.com/community/itsm-forum/gs-getuser-ismemberof-current-assignment-group-not-working/m-p/2614324#M498434</link>
      <description>&lt;P&gt;&lt;STRONG&gt;gs.getUser().isMemberOf(current.assignment_group.toString())&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;This one works!&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 18:53:54 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/gs-getuser-ismemberof-current-assignment-group-not-working/m-p/2614324#M498434</guid>
      <dc:creator>Sanket Shinde</dc:creator>
      <dc:date>2023-07-14T18:53:54Z</dc:date>
    </item>
  </channel>
</rss>

