<?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 How to make all fields readonly on the incident form for Cancelled state? in ITSM forum</title>
    <link>https://www.servicenow.com/community/itsm-forum/how-to-make-all-fields-readonly-on-the-incident-form-for/m-p/570845#M142624</link>
    <description>&lt;P&gt;When the state changes to cancelled - for all the itil users -- all the fields should be readonly.&lt;/P&gt;</description>
    <pubDate>Tue, 24 May 2022 08:01:21 GMT</pubDate>
    <dc:creator>Bharath kumar6</dc:creator>
    <dc:date>2022-05-24T08:01:21Z</dc:date>
    <item>
      <title>How to make all fields readonly on the incident form for Cancelled state?</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-make-all-fields-readonly-on-the-incident-form-for/m-p/570845#M142624</link>
      <description>&lt;P&gt;When the state changes to cancelled - for all the itil users -- all the fields should be readonly.&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 08:01:21 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-make-all-fields-readonly-on-the-incident-form-for/m-p/570845#M142624</guid>
      <dc:creator>Bharath kumar6</dc:creator>
      <dc:date>2022-05-24T08:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to make all fields readonly on the incident form for Cancelled state?</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-make-all-fields-readonly-on-the-incident-form-for/m-p/570846#M142625</link>
      <description>&lt;P&gt;Hi Bharat,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Try below code in Onchange Client script on state&amp;nbsp;&lt;/P&gt;
&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;if(g_user.hasRole("itil") &amp;amp;&amp;amp; g_form.getValue("state")==8) {
	 var fields = g_form.getEditableFields();
         for (var x = 0; x &amp;lt; fields.length; x++) {
           g_form.setReadOnly(fields[x], true);
         }
	}&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 May 2022 08:12:34 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-make-all-fields-readonly-on-the-incident-form-for/m-p/570846#M142625</guid>
      <dc:creator>Chetan Mahajan</dc:creator>
      <dc:date>2022-05-24T08:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to make all fields readonly on the incident form for Cancelled state?</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-make-all-fields-readonly-on-the-incident-form-for/m-p/570847#M142626</link>
      <description>&lt;P&gt;Ideal option will be to create ACL of type write for each field when state changes to Cancelled for required table &amp;amp; for required ITIL users.&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 08:20:49 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-make-all-fields-readonly-on-the-incident-form-for/m-p/570847#M142626</guid>
      <dc:creator>Jaspal Singh</dc:creator>
      <dc:date>2022-05-24T08:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to make all fields readonly on the incident form for Cancelled state?</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-make-all-fields-readonly-on-the-incident-form-for/m-p/570848#M142627</link>
      <description>&lt;P&gt;Hi Bharath,&lt;/P&gt;
&lt;P&gt;There is an OOTB UI Policy "Make fields read-only on close" which does that. You can go ahead and check that UI Policy.&lt;/P&gt;
&lt;P&gt;When a state changes to cancelled or closed all the fields will automatically be read-only.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Visakha&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 08:45:29 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-make-all-fields-readonly-on-the-incident-form-for/m-p/570848#M142627</guid>
      <dc:creator>Community Alums</dc:creator>
      <dc:date>2022-05-24T08:45:29Z</dc:date>
    </item>
  </channel>
</rss>

