<?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 do I cancel an incident after a Request has been created from it? in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/how-do-i-cancel-an-incident-after-a-request-has-been-created/m-p/3560087#M1257994</link>
    <description>&lt;P&gt;In our instance, we only have technicians creating Requests (users can create Incidents). We will create Requests from Incidents. I have tried creating a Business Rule to cancel the Incident after the Request has been made and I'm running into a couple issues.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here is the script I'm using:&amp;nbsp;&lt;/STRONG&gt;&lt;BR /&gt;(function executeRule(current, previous /*null when async*/) {&lt;BR /&gt;// Ensure the request has a valid parent Incident&lt;BR /&gt;var grIncident = new GlideRecord('incident');&lt;BR /&gt;if (grIncident.get(current.parent)) {&lt;BR /&gt;// Update the incident state to Cancelled (typically &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt;&lt;BR /&gt;grIncident.incident_state = 8;&lt;BR /&gt;&lt;BR /&gt;// Populate required cancellation fields (verify exact choices for your instance)&lt;BR /&gt;grIncident.close_code = 'Service Request Created';&lt;BR /&gt;grIncident.close_notes = 'Incident canceled due to automatic Request creation: ' + current.number;&lt;BR /&gt;&lt;BR /&gt;grIncident.update();&lt;BR /&gt;}&lt;BR /&gt;})(current, previous);&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This instructions I see ask me to use the following conditions:&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Configure the &lt;STRONG&gt;Filter Conditions&lt;/STRONG&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL class=""&gt;&lt;LI&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Parent&lt;/SPAN&gt;&lt;SPAN class=""&gt; (or &lt;/SPAN&gt;&lt;SPAN class=""&gt;Request for&lt;/SPAN&gt;&lt;SPAN class=""&gt;) &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;is not empty&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Parent.sys_class_name&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN class=""&gt;is&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN class=""&gt;incident&lt;/SPAN&gt; &lt;EM&gt;&lt;SPAN class=""&gt;(ensures it only runs when the request is generated from an incident)&lt;/SPAN&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;Please help me figure out how to configure &lt;STRONG&gt;parent.sys_class_name&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I do not have that option in my settings (see screenshot). I don't see it as a filter, clause or role condition.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 16 Jun 2026 16:55:39 GMT</pubDate>
    <dc:creator>TALENAJ</dc:creator>
    <dc:date>2026-06-16T16:55:39Z</dc:date>
    <item>
      <title>How do I cancel an incident after a Request has been created from it?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-do-i-cancel-an-incident-after-a-request-has-been-created/m-p/3560087#M1257994</link>
      <description>&lt;P&gt;In our instance, we only have technicians creating Requests (users can create Incidents). We will create Requests from Incidents. I have tried creating a Business Rule to cancel the Incident after the Request has been made and I'm running into a couple issues.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here is the script I'm using:&amp;nbsp;&lt;/STRONG&gt;&lt;BR /&gt;(function executeRule(current, previous /*null when async*/) {&lt;BR /&gt;// Ensure the request has a valid parent Incident&lt;BR /&gt;var grIncident = new GlideRecord('incident');&lt;BR /&gt;if (grIncident.get(current.parent)) {&lt;BR /&gt;// Update the incident state to Cancelled (typically &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt;&lt;BR /&gt;grIncident.incident_state = 8;&lt;BR /&gt;&lt;BR /&gt;// Populate required cancellation fields (verify exact choices for your instance)&lt;BR /&gt;grIncident.close_code = 'Service Request Created';&lt;BR /&gt;grIncident.close_notes = 'Incident canceled due to automatic Request creation: ' + current.number;&lt;BR /&gt;&lt;BR /&gt;grIncident.update();&lt;BR /&gt;}&lt;BR /&gt;})(current, previous);&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This instructions I see ask me to use the following conditions:&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Configure the &lt;STRONG&gt;Filter Conditions&lt;/STRONG&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL class=""&gt;&lt;LI&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Parent&lt;/SPAN&gt;&lt;SPAN class=""&gt; (or &lt;/SPAN&gt;&lt;SPAN class=""&gt;Request for&lt;/SPAN&gt;&lt;SPAN class=""&gt;) &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;is not empty&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Parent.sys_class_name&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN class=""&gt;is&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN class=""&gt;incident&lt;/SPAN&gt; &lt;EM&gt;&lt;SPAN class=""&gt;(ensures it only runs when the request is generated from an incident)&lt;/SPAN&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;Please help me figure out how to configure &lt;STRONG&gt;parent.sys_class_name&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I do not have that option in my settings (see screenshot). I don't see it as a filter, clause or role condition.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2026 16:55:39 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-do-i-cancel-an-incident-after-a-request-has-been-created/m-p/3560087#M1257994</guid>
      <dc:creator>TALENAJ</dc:creator>
      <dc:date>2026-06-16T16:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do I cancel an incident after a Request has been created from it?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-do-i-cancel-an-incident-after-a-request-has-been-created/m-p/3560097#M1257995</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/1066805"&gt;@TALENAJ&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;You can check the condition in the &lt;STRONG&gt;Advanced&amp;nbsp;tab, &lt;/STRONG&gt;as shown in the image below.&lt;STRONG&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2026-06-16 at 10.35.24 PM.png" style="width: 999px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/520046iFCC21D57976DF84A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2026-06-16 at 10.35.24 PM.png" alt="Screenshot 2026-06-16 at 10.35.24 PM.png" /&gt;&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;current.parent.sys_class_name=='incident'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If my response helped, mark it as helpful and accept the solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Dinesh&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2026 17:09:35 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-do-i-cancel-an-incident-after-a-request-has-been-created/m-p/3560097#M1257995</guid>
      <dc:creator>Dinesh Chilaka</dc:creator>
      <dc:date>2026-06-16T17:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: How do I cancel an incident after a Request has been created from it?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-do-i-cancel-an-incident-after-a-request-has-been-created/m-p/3560108#M1257997</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/1066805"&gt;@TALENAJ&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Update the existing Active UI Action "Create Request" on Incident&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Navigate to &lt;STRONG&gt;System Definition &amp;gt; UI Actions&lt;/STRONG&gt; and find the existing UI Action used to &lt;STRONG&gt;create Requests&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;Add the following Script to your UI Action script, ensuring it updates the incident state and closure fields before updating the record:&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;current.state = 8;&lt;/P&gt;&lt;P&gt;current.close_code = 'Service Request Created';&lt;/P&gt;&lt;P&gt;current.close_notes = 'Incident cancelled as it was converted to a Request.';&lt;/P&gt;&lt;P&gt;current.update();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2026 17:19:40 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-do-i-cancel-an-incident-after-a-request-has-been-created/m-p/3560108#M1257997</guid>
      <dc:creator>Tanushree Maiti</dc:creator>
      <dc:date>2026-06-16T17:19:40Z</dc:date>
    </item>
  </channel>
</rss>

