<?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: If short description is same as current short description,then user must not be able to save inc in CSM forum</title>
    <link>https://www.servicenow.com/community/csm-forum/if-short-description-is-same-as-current-short-description-then/m-p/2819861#M36830</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/522133"&gt;@Shubham_verma&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Try this&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;function&lt;/SPAN&gt;&lt;SPAN&gt; executeRule(current, previous &lt;/SPAN&gt;&lt;SPAN&gt;/*null when async*/&lt;/SPAN&gt;&lt;SPAN&gt;) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; grIncident = &lt;/SPAN&gt;&lt;SPAN&gt;new&lt;/SPAN&gt; &lt;SPAN&gt;GlideRecord&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'incident'&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;grIncident.addQuery(&lt;/SPAN&gt;&lt;SPAN&gt;"short_description"&lt;/SPAN&gt;&lt;SPAN&gt;,current.short_description);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;grIncident.query();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; (grIncident.next()) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; current.setAbortAction(&lt;/SPAN&gt;&lt;SPAN&gt;true&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;})(current, previous);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Make sure you have not applied any condition on when to run section&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Please mark help if this resolves your query&lt;BR /&gt;Thanks!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 08 Feb 2024 09:40:36 GMT</pubDate>
    <dc:creator>_Gaurav</dc:creator>
    <dc:date>2024-02-08T09:40:36Z</dc:date>
    <item>
      <title>If short description is same as current short description,then user must not be able to save inciden</title>
      <link>https://www.servicenow.com/community/csm-forum/if-short-description-is-same-as-current-short-description-then/m-p/2819820#M36821</link>
      <description>&lt;P&gt;&lt;SPAN&gt;When user tries to enter short description on incident form,if short description is same as recently entered short description,then user must not be able to submit incident.How can we achieve this?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 09:14:52 GMT</pubDate>
      <guid>https://www.servicenow.com/community/csm-forum/if-short-description-is-same-as-current-short-description-then/m-p/2819820#M36821</guid>
      <dc:creator>Shubham_verma</dc:creator>
      <dc:date>2024-02-08T09:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: If short description is same as current short description,then user must not be able to save inc</title>
      <link>https://www.servicenow.com/community/csm-forum/if-short-description-is-same-as-current-short-description-then/m-p/2819825#M36822</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/522133"&gt;@Shubham_verma&lt;/a&gt;&amp;nbsp; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Design BR on Before Insert on Incident Table and use this Below Script&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function onBefore(current, previous) {
  var gr = new GlideRecord('incident');
  gr.addQuery('short_description', current.short_description);
   gr.query();
   while(gr.next())
   gs.addInfoMessage('Incident exists With same short description please select different SD');  //change as you need
   current.setAbortAction(true); //aborts the record

   }

}

&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shyamkumar&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 09:18:54 GMT</pubDate>
      <guid>https://www.servicenow.com/community/csm-forum/if-short-description-is-same-as-current-short-description-then/m-p/2819825#M36822</guid>
      <dc:creator>shyamkumar VK</dc:creator>
      <dc:date>2024-02-08T09:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: If short description is same as current short description,then user must not be able to save inc</title>
      <link>https://www.servicenow.com/community/csm-forum/if-short-description-is-same-as-current-short-description-then/m-p/2819850#M36827</link>
      <description>&lt;P&gt;I opened a existing incident,tried to update short description with same name as well as different name .In both cases incident is getting updated.?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 09:29:47 GMT</pubDate>
      <guid>https://www.servicenow.com/community/csm-forum/if-short-description-is-same-as-current-short-description-then/m-p/2819850#M36827</guid>
      <dc:creator>Shubham_verma</dc:creator>
      <dc:date>2024-02-08T09:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: If short description is same as current short description,then user must not be able to save inc</title>
      <link>https://www.servicenow.com/community/csm-forum/if-short-description-is-same-as-current-short-description-then/m-p/2819856#M36828</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/158340"&gt;@shyamkumar VK&lt;/a&gt;&amp;nbsp;:-&amp;nbsp; You need to select update checkbox in your BR so that it will work for update as well if you want to restrict for update.&lt;/P&gt;
&lt;P&gt;Kindly mark helpful/accepted if it helps you.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Priyanka Salunke&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 09:35:54 GMT</pubDate>
      <guid>https://www.servicenow.com/community/csm-forum/if-short-description-is-same-as-current-short-description-then/m-p/2819856#M36828</guid>
      <dc:creator>Priyanka_786</dc:creator>
      <dc:date>2024-02-08T09:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: If short description is same as current short description,then user must not be able to save inc</title>
      <link>https://www.servicenow.com/community/csm-forum/if-short-description-is-same-as-current-short-description-then/m-p/2819859#M36829</link>
      <description>&lt;P&gt;Have selected update checkbox in BR,still existing incident is updating .&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 09:38:30 GMT</pubDate>
      <guid>https://www.servicenow.com/community/csm-forum/if-short-description-is-same-as-current-short-description-then/m-p/2819859#M36829</guid>
      <dc:creator>Shubham_verma</dc:creator>
      <dc:date>2024-02-08T09:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: If short description is same as current short description,then user must not be able to save inc</title>
      <link>https://www.servicenow.com/community/csm-forum/if-short-description-is-same-as-current-short-description-then/m-p/2819861#M36830</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/522133"&gt;@Shubham_verma&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Try this&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;function&lt;/SPAN&gt;&lt;SPAN&gt; executeRule(current, previous &lt;/SPAN&gt;&lt;SPAN&gt;/*null when async*/&lt;/SPAN&gt;&lt;SPAN&gt;) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; grIncident = &lt;/SPAN&gt;&lt;SPAN&gt;new&lt;/SPAN&gt; &lt;SPAN&gt;GlideRecord&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'incident'&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;grIncident.addQuery(&lt;/SPAN&gt;&lt;SPAN&gt;"short_description"&lt;/SPAN&gt;&lt;SPAN&gt;,current.short_description);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;grIncident.query();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; (grIncident.next()) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; current.setAbortAction(&lt;/SPAN&gt;&lt;SPAN&gt;true&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;})(current, previous);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Make sure you have not applied any condition on when to run section&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Please mark help if this resolves your query&lt;BR /&gt;Thanks!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 08 Feb 2024 09:40:36 GMT</pubDate>
      <guid>https://www.servicenow.com/community/csm-forum/if-short-description-is-same-as-current-short-description-then/m-p/2819861#M36830</guid>
      <dc:creator>_Gaurav</dc:creator>
      <dc:date>2024-02-08T09:40:36Z</dc:date>
    </item>
    <item>
      <title>Re: If short description is same as current short description,then user must not be able to save inc</title>
      <link>https://www.servicenow.com/community/csm-forum/if-short-description-is-same-as-current-short-description-then/m-p/2819882#M36835</link>
      <description>&lt;P&gt;After using this script,When I am updating short description with different name its not working,If I use same short description value which was written earlier,then incident is getting saved.&lt;/P&gt;&lt;P&gt;If short desc value is same as earlier&amp;nbsp; then it should not get saved.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 09:49:05 GMT</pubDate>
      <guid>https://www.servicenow.com/community/csm-forum/if-short-description-is-same-as-current-short-description-then/m-p/2819882#M36835</guid>
      <dc:creator>Shubham_verma</dc:creator>
      <dc:date>2024-02-08T09:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: If short description is same as current short description,then user must not be able to save inc</title>
      <link>https://www.servicenow.com/community/csm-forum/if-short-description-is-same-as-current-short-description-then/m-p/2819897#M36837</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/522133"&gt;@Shubham_verma&lt;/a&gt;&amp;nbsp; , How did you perform Testing ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So when you create an INC giving Short description as XYZ and if this SD already Exists it aborts the Submission&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if you want the same for Update as well enable update Operation as well&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;add gs.log to check if BR is triggering or not&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shyamkumar&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 09:51:01 GMT</pubDate>
      <guid>https://www.servicenow.com/community/csm-forum/if-short-description-is-same-as-current-short-description-then/m-p/2819897#M36837</guid>
      <dc:creator>shyamkumar VK</dc:creator>
      <dc:date>2024-02-08T09:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: If short description is same as current short description,then user must not be able to save inc</title>
      <link>https://www.servicenow.com/community/csm-forum/if-short-description-is-same-as-current-short-description-then/m-p/2819915#M36839</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/522133"&gt;@Shubham_verma&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;The script will take the SD value that you're entering, with all the incidents present in the system, if the SD matches with any other incident's SD, then it will not allow you to save the incident, however, if no SD matches then it will allow you to save the incident.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 10:02:44 GMT</pubDate>
      <guid>https://www.servicenow.com/community/csm-forum/if-short-description-is-same-as-current-short-description-then/m-p/2819915#M36839</guid>
      <dc:creator>_Gaurav</dc:creator>
      <dc:date>2024-02-08T10:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: If short description is same as current short description,then user must not be able to save inc</title>
      <link>https://www.servicenow.com/community/csm-forum/if-short-description-is-same-as-current-short-description-then/m-p/2819973#M36841</link>
      <description>&lt;P&gt;The code you provided is working fine when creating a new incident &amp;amp; update incident but,&lt;/P&gt;&lt;P&gt;when I open a existing incident &amp;amp; SD is XYZ .When I again write XYZ in SD its getting saved.I wanted to abort if I write same SD as written earlier on existing incident.It should not get saved.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 10:37:49 GMT</pubDate>
      <guid>https://www.servicenow.com/community/csm-forum/if-short-description-is-same-as-current-short-description-then/m-p/2819973#M36841</guid>
      <dc:creator>Shubham_verma</dc:creator>
      <dc:date>2024-02-08T10:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: If short description is same as current short description,then user must not be able to save inc</title>
      <link>https://www.servicenow.com/community/csm-forum/if-short-description-is-same-as-current-short-description-then/m-p/2819977#M36842</link>
      <description>&lt;P&gt;The code you provided is working fine when creating a new incident &amp;amp; update incident but,&lt;/P&gt;&lt;P&gt;when I open a existing incident &amp;amp; SD is XYZ .When I again write XYZ in SD its getting saved.I wanted to abort if I write same SD as written earlier on existing incident.It should not get saved..&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 10:39:01 GMT</pubDate>
      <guid>https://www.servicenow.com/community/csm-forum/if-short-description-is-same-as-current-short-description-then/m-p/2819977#M36842</guid>
      <dc:creator>Shubham_verma</dc:creator>
      <dc:date>2024-02-08T10:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: If short description is same as current short description,then user must not be able to save inc</title>
      <link>https://www.servicenow.com/community/csm-forum/if-short-description-is-same-as-current-short-description-then/m-p/2820000#M36843</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/522133"&gt;@Shubham_verma&lt;/a&gt;&amp;nbsp; , when you update XYZ to XYZ , there wont be any difference right Shubam&amp;nbsp;&lt;/P&gt;&lt;P&gt;Technically when you update from XYZ to YZA and then when you update YZA to XYZ in next update it throughs error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shyamkumar&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 10:52:32 GMT</pubDate>
      <guid>https://www.servicenow.com/community/csm-forum/if-short-description-is-same-as-current-short-description-then/m-p/2820000#M36843</guid>
      <dc:creator>shyamkumar VK</dc:creator>
      <dc:date>2024-02-08T10:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: If short description is same as current short description,then user must not be able to save inc</title>
      <link>https://www.servicenow.com/community/csm-forum/if-short-description-is-same-as-current-short-description-then/m-p/2820003#M36844</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/522133"&gt;@Shubham_verma&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;There is no sense in writing BR in this case as BR will work only when the record is updated.&lt;/P&gt;&lt;P&gt;See if your incident's SD is XYZ and you're clearing it out and writing again XYZ as the SD then the BR will not run.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 10:55:26 GMT</pubDate>
      <guid>https://www.servicenow.com/community/csm-forum/if-short-description-is-same-as-current-short-description-then/m-p/2820003#M36844</guid>
      <dc:creator>_Gaurav</dc:creator>
      <dc:date>2024-02-08T10:55:26Z</dc:date>
    </item>
  </channel>
</rss>

