<?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 Need to write an ACL to allow only members of particular group to edit few fields in location table in ITSM forum</title>
    <link>https://www.servicenow.com/community/itsm-forum/need-to-write-an-acl-to-allow-only-members-of-particular-group/m-p/837121#M408900</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Having a requirement to write a ACL to allow only members of a particular group to edit three user defined fields in location table. Kindly suggest.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Kayathri&lt;/P&gt;</description>
    <pubDate>Tue, 20 Jul 2021 06:44:16 GMT</pubDate>
    <dc:creator>Kayathri</dc:creator>
    <dc:date>2021-07-20T06:44:16Z</dc:date>
    <item>
      <title>Need to write an ACL to allow only members of particular group to edit few fields in location table</title>
      <link>https://www.servicenow.com/community/itsm-forum/need-to-write-an-acl-to-allow-only-members-of-particular-group/m-p/837121#M408900</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Having a requirement to write a ACL to allow only members of a particular group to edit three user defined fields in location table. Kindly suggest.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Kayathri&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jul 2021 06:44:16 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/need-to-write-an-acl-to-allow-only-members-of-particular-group/m-p/837121#M408900</guid>
      <dc:creator>Kayathri</dc:creator>
      <dc:date>2021-07-20T06:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: Need to write an ACL to allow only members of particular group to edit few fields in location table</title>
      <link>https://www.servicenow.com/community/itsm-forum/need-to-write-an-acl-to-allow-only-members-of-particular-group/m-p/837122#M408901</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;You need to create a Write ACL for the table_name.field_name. SO you need to create three&amp;nbsp;ACL's for three fields.&lt;/P&gt;
&lt;P&gt;In your ACL script you can check gs.isMemberOf('GroupName/Sys_id') to check whether user is member of particular group.&lt;/P&gt;
&lt;P&gt;If user is member of group set answer=true else answer=false&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;Anil Lande&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jul 2021 06:49:22 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/need-to-write-an-acl-to-allow-only-members-of-particular-group/m-p/837122#M408901</guid>
      <dc:creator>Anil Lande</dc:creator>
      <dc:date>2021-07-20T06:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: Need to write an ACL to allow only members of particular group to edit few fields in location table</title>
      <link>https://www.servicenow.com/community/itsm-forum/need-to-write-an-acl-to-allow-only-members-of-particular-group/m-p/837123#M408902</link>
      <description>&lt;P&gt;&lt;SN-MENTION class="sn-mention" table="live_profile" sysid="8640e22cdb9c60109e691ea66896197e"&gt;@Kayathri&lt;/SN-MENTION&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As mentioned by Anil you can use 3 field level WRITE ACLs on individual fields.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;OR&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;If you don't want to create 3 ACLs then you can take &lt;STRONG&gt;Display BR + Client Script approach&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Display BR: it would check if logged in user is member of particular group and store in g_scratchpad&lt;/P&gt;
&lt;P&gt;onLoad Client Script: it would get the scratchpad variable value and based on true/false allow edit of those 3 fields on form&lt;/P&gt;
&lt;P&gt;Regards&lt;BR /&gt;Ankur&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jul 2021 06:57:57 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/need-to-write-an-acl-to-allow-only-members-of-particular-group/m-p/837123#M408902</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2021-07-20T06:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: Need to write an ACL to allow only members of particular group to edit few fields in location table</title>
      <link>https://www.servicenow.com/community/itsm-forum/need-to-write-an-acl-to-allow-only-members-of-particular-group/m-p/837124#M408903</link>
      <description>&lt;P&gt;Hi Ankur,&lt;/P&gt;
&lt;P&gt;I have the requirement that the three fields should be editable by the members of the particular group, so I have written a table level ACL to make that edit all the fields,3&amp;nbsp; field level ACLs also written, since only the members of those group should access those 3 fields, not other members. now I want to restrict the group members to edit only the three fields. Please suggest how it can be done.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Kayathri&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 15:01:05 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/need-to-write-an-acl-to-allow-only-members-of-particular-group/m-p/837124#M408903</guid>
      <dc:creator>Kayathri</dc:creator>
      <dc:date>2021-07-21T15:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Need to write an ACL to allow only members of particular group to edit few fields in location table</title>
      <link>https://www.servicenow.com/community/itsm-forum/need-to-write-an-acl-to-allow-only-members-of-particular-group/m-p/837125#M408904</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;so members of that group should be allowed editing only 3 fields&lt;/P&gt;
&lt;P&gt;All others should be readonly&lt;/P&gt;
&lt;P&gt;Do this&lt;/P&gt;
&lt;P&gt;Display BR on your table:&lt;/P&gt;
&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;g_scratchpad.isMember = gs.getUser().isMemberOf('Group Name');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;onLoad Client Script:&lt;/P&gt;
&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;function onLoad(){

	if(g_scratchpad.isMember.toString() == 'true'){

		// make all fields readonly
		var fields = g_form.getEditableFields();
		for (var x = 0; x &amp;lt; fields.length; x++) {
			g_form.setReadOnly(fields[x], true);
		}

		// make those 3 fields as editable
		g_form.setReadOnly('fieldA', false);
		g_form.setReadOnly('fieldB', false);
		g_form.setReadOnly('fieldC', false);
	}

}&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Regards&lt;BR /&gt;Ankur&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 15:18:44 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/need-to-write-an-acl-to-allow-only-members-of-particular-group/m-p/837125#M408904</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2021-07-21T15:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: Need to write an ACL to allow only members of particular group to edit few fields in location table</title>
      <link>https://www.servicenow.com/community/itsm-forum/need-to-write-an-acl-to-allow-only-members-of-particular-group/m-p/837126#M408905</link>
      <description>&lt;P&gt;Hi Ankur,&lt;/P&gt;
&lt;P&gt;This is the BR I have used,&lt;span class="lia-inline-image-display-wrapper" image-alt="find_real_file.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/92313iCB50EF6447DD1D1E/image-size/large?v=v2&amp;amp;px=999" role="button" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="find_real_file.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/92315i1C95360296F29D3B/image-size/large?v=v2&amp;amp;px=999" role="button" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the onload script I have used,&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="find_real_file.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/92314i167FA5CDDB8CA341/image-size/large?v=v2&amp;amp;px=999" role="button" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;but its not working as expected, kindly suggest.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Kayathri&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 10:10:35 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/need-to-write-an-acl-to-allow-only-members-of-particular-group/m-p/837126#M408905</guid>
      <dc:creator>Kayathri</dc:creator>
      <dc:date>2021-07-22T10:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: Need to write an ACL to allow only members of particular group to edit few fields in location table</title>
      <link>https://www.servicenow.com/community/itsm-forum/need-to-write-an-acl-to-allow-only-members-of-particular-group/m-p/837127#M408906</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;did you add alert what came in client script?&lt;/P&gt;
&lt;P&gt;Did you check any UI policy etc is making those 3 fields read-only?&lt;/P&gt;
&lt;P&gt;function onLoad(){&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if(g_scratchpad.isMember.toString() == 'true'){&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;alert('inside if');&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;// make all fields readonly&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;var fields = g_form.getEditableFields();&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;for (var x = 0; x &amp;lt; fields.length; x++) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;g_form.setReadOnly(fields[x], true);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;// make those 3 fields as editable&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;g_form.setReadOnly('fieldA', false);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;g_form.setReadOnly('fieldB', false);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;g_form.setReadOnly('fieldC', false);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;Regards&lt;BR /&gt;Ankur&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 10:28:08 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/need-to-write-an-acl-to-allow-only-members-of-particular-group/m-p/837127#M408906</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2021-07-22T10:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: Need to write an ACL to allow only members of particular group to edit few fields in location table</title>
      <link>https://www.servicenow.com/community/itsm-forum/need-to-write-an-acl-to-allow-only-members-of-particular-group/m-p/837128#M408907</link>
      <description>&lt;P&gt;Hi Ankur,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is no UI policy for these 3 fields,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;function onLoad() {&lt;BR /&gt; //Type appropriate comment here, and begin script below&lt;BR /&gt; if(g_scratchpad.isMember.toString() == 'true'){&lt;BR /&gt; alert('inside if');&lt;/P&gt;
&lt;P&gt;// make all fields readonly&lt;BR /&gt; var fields = g_form.getEditableFields();&lt;BR /&gt; for (var x = 0; x &amp;lt; fields.length; x++) {&lt;BR /&gt; alert('inside for');&lt;BR /&gt; g_form.setReadOnly(fields[x], true);&lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt;// make those 3 fields as editable&lt;BR /&gt; g_form.setReadOnly('u_hot_site', false);&lt;BR /&gt; g_form.setReadOnly('u_hot_site_end_date', false);&lt;BR /&gt; g_form.setReadOnly('u_hot_site_reason', false);&lt;BR /&gt; &lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Its going "inside if", but not "inside for".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Kayathri&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 11:17:59 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/need-to-write-an-acl-to-allow-only-members-of-particular-group/m-p/837128#M408907</guid>
      <dc:creator>Kayathri</dc:creator>
      <dc:date>2021-07-22T11:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: Need to write an ACL to allow only members of particular group to edit few fields in location table</title>
      <link>https://www.servicenow.com/community/itsm-forum/need-to-write-an-acl-to-allow-only-members-of-particular-group/m-p/837129#M408908</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I hope you are running this on native instance?&lt;/P&gt;
&lt;P&gt;Regards&lt;BR /&gt;Ankur&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 11:30:10 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/need-to-write-an-acl-to-allow-only-members-of-particular-group/m-p/837129#M408908</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2021-07-22T11:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: Need to write an ACL to allow only members of particular group to edit few fields in location table</title>
      <link>https://www.servicenow.com/community/itsm-forum/need-to-write-an-acl-to-allow-only-members-of-particular-group/m-p/837130#M408909</link>
      <description>&lt;P&gt;Sorry Ankur, I haven't given the role in ACL, that was my mistake, your code is perfect.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;kayathri&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 11:38:51 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/need-to-write-an-acl-to-allow-only-members-of-particular-group/m-p/837130#M408909</guid>
      <dc:creator>Kayathri</dc:creator>
      <dc:date>2021-07-22T11:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: Need to write an ACL to allow only members of particular group to edit few fields in location table</title>
      <link>https://www.servicenow.com/community/itsm-forum/need-to-write-an-acl-to-allow-only-members-of-particular-group/m-p/837131#M408910</link>
      <description>&lt;P&gt;Glad to help.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 11:50:44 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/need-to-write-an-acl-to-allow-only-members-of-particular-group/m-p/837131#M408910</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2021-07-22T11:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: Need to write an ACL to allow only members of particular group to edit few fields in location table</title>
      <link>https://www.servicenow.com/community/itsm-forum/need-to-write-an-acl-to-allow-only-members-of-particular-group/m-p/837132#M408911</link>
      <description>&lt;P&gt;&lt;SN-MENTION class="sn-mention" table="live_profile" sysid="8640e22cdb9c60109e691ea66896197e"&gt;@Kayathri&lt;/SN-MENTION&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would you mind closing this question by marking appropriate response as correct&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=2b0f4094db782810a08a1ea6689619f5" target="_blank"&gt; How to translate, None in Arabic, where None is OOTB &lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Regards&lt;BR /&gt;Ankur&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 11:51:17 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/need-to-write-an-acl-to-allow-only-members-of-particular-group/m-p/837132#M408911</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2021-07-22T11:51:17Z</dc:date>
    </item>
  </channel>
</rss>

