<?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: When any Problem Ticket closed then related incidents should automatically close  in ITSM forum</title>
    <link>https://www.servicenow.com/community/itsm-forum/when-any-problem-ticket-closed-then-related-incidents-should/m-p/833290#M405069</link>
    <description>&lt;P&gt;Hello Author,&lt;/P&gt;
&lt;P&gt;Please follow this link&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=3d725f61db101fc01dcaf3231f96190b"&gt;when problem ticket closed then related incidents close automatically - Developer Community - Question - ServiceNow Community&lt;/A&gt;&lt;/P&gt;
&lt;DIV id="cm_feed_child_desc_2_0_0_260cc8501bc0389017d162c4bd4bcb30" class="cm-feed-desc" data-ng-class="c.getClassNames(comment,'cm_feed_child_desc_'+parentIndex+'_'+childIndex+'_'+$index+'_'+comment.sys_id)"&gt;
&lt;P&gt;Please mark Correct&lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt;/helpful if applicable, thanks!!&lt;/P&gt;
&lt;P&gt;Prasad&lt;/P&gt;
&lt;/DIV&gt;
&lt;DIV class="cm-view-more ng-scope"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
    <pubDate>Fri, 07 May 2021 11:56:54 GMT</pubDate>
    <dc:creator>Prasad Dhumal</dc:creator>
    <dc:date>2021-05-07T11:56:54Z</dc:date>
    <item>
      <title>When any Problem Ticket closed then related incidents should automatically close</title>
      <link>https://www.servicenow.com/community/itsm-forum/when-any-problem-ticket-closed-then-related-incidents-should/m-p/833289#M405068</link>
      <description>&lt;P&gt;When problem ticket closed then related incidents tickets should close automatically&lt;/P&gt;
&lt;P&gt;Is there Out Of The Box way to achieve this?&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 11:49:39 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/when-any-problem-ticket-closed-then-related-incidents-should/m-p/833289#M405068</guid>
      <dc:creator>Harshad1</dc:creator>
      <dc:date>2021-05-07T11:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: When any Problem Ticket closed then related incidents should automatically close</title>
      <link>https://www.servicenow.com/community/itsm-forum/when-any-problem-ticket-closed-then-related-incidents-should/m-p/833290#M405069</link>
      <description>&lt;P&gt;Hello Author,&lt;/P&gt;
&lt;P&gt;Please follow this link&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=3d725f61db101fc01dcaf3231f96190b"&gt;when problem ticket closed then related incidents close automatically - Developer Community - Question - ServiceNow Community&lt;/A&gt;&lt;/P&gt;
&lt;DIV id="cm_feed_child_desc_2_0_0_260cc8501bc0389017d162c4bd4bcb30" class="cm-feed-desc" data-ng-class="c.getClassNames(comment,'cm_feed_child_desc_'+parentIndex+'_'+childIndex+'_'+$index+'_'+comment.sys_id)"&gt;
&lt;P&gt;Please mark Correct&lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt;/helpful if applicable, thanks!!&lt;/P&gt;
&lt;P&gt;Prasad&lt;/P&gt;
&lt;/DIV&gt;
&lt;DIV class="cm-view-more ng-scope"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Fri, 07 May 2021 11:56:54 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/when-any-problem-ticket-closed-then-related-incidents-should/m-p/833290#M405069</guid>
      <dc:creator>Prasad Dhumal</dc:creator>
      <dc:date>2021-05-07T11:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: When any Problem Ticket closed then related incidents should automatically close</title>
      <link>https://www.servicenow.com/community/itsm-forum/when-any-problem-ticket-closed-then-related-incidents-should/m-p/833291#M405070</link>
      <description>&lt;P&gt;Hi Harshad,&lt;/P&gt;
&lt;P&gt;I'm not aware of any OOTB functionality, but it can be accomplished with a pretty simple After Update Business Rule:&lt;/P&gt;
&lt;PRE class="language-javascript"&gt;&lt;CODE&gt; var incident = new GlideRecord("incident");
  incident.addQuery("problem_id", "=", me.sys_id);
  incident.query();
  while (incident.next()) {
    if ( incident.active == true ){
       incident.setValue("state", IncidentState.CLOSED);
       incident.setValue("active", false);
       incident.setValue("rfc", me.rfc);
       incident.setValue("work_notes", msg);
       incident.setValue("close_code", me.u_close_code);
       incident.setValue("close_notes", me.close_notes);
       incident.update(); 
    }
  }&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can set whatever values for the incident you need in the body.&amp;nbsp; I wrote this quite a while back and it still works fine.&lt;/P&gt;
&lt;P&gt;Hope that helps.&lt;BR /&gt;&lt;BR /&gt;:{)&lt;BR /&gt;&lt;BR /&gt;Helpful and Correct tags are appreciated and help others to find information faster&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 12:02:32 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/when-any-problem-ticket-closed-then-related-incidents-should/m-p/833291#M405070</guid>
      <dc:creator>johnfeist</dc:creator>
      <dc:date>2021-05-07T12:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: When any Problem Ticket closed then related incidents should automatically close</title>
      <link>https://www.servicenow.com/community/itsm-forum/when-any-problem-ticket-closed-then-related-incidents-should/m-p/833292#M405071</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Harshad Pasalkar,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;You can refer below code for this.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;var gr = new GlideRecord("incident");&lt;BR /&gt;gr.addActiveQuery();&lt;BR /&gt;gr.addQuery('problem_id',current.sys_id);&lt;BR /&gt;gr.query();&lt;BR /&gt;while(gr.next())&lt;BR /&gt;{&lt;BR /&gt;gr.state = '7';&lt;BR /&gt;gr.close_code = 'Solved';&lt;BR /&gt;gr.close_notes = "Related incidents got closed on closing of problem";&lt;BR /&gt;gr.update();&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;If this solution works for you, please mark it as helpful.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Regards,&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Nikita Joshi&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 12:22:16 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/when-any-problem-ticket-closed-then-related-incidents-should/m-p/833292#M405071</guid>
      <dc:creator>Nikita Joshi</dc:creator>
      <dc:date>2021-05-07T12:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: When any Problem Ticket closed then related incidents should automatically close</title>
      <link>https://www.servicenow.com/community/itsm-forum/when-any-problem-ticket-closed-then-related-incidents-should/m-p/833293#M405072</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Hi&amp;nbsp;Harshad Pasalkar,&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I have tried with senario in my pdi you can use&amp;nbsp;After Update Business Rule&lt;/P&gt;
&lt;P&gt;// Add your code here&lt;BR /&gt; var vew = new GlideRecord('incident');&lt;BR /&gt; vew.addActiveQuery(); //Cross check only active incidents&lt;BR /&gt; vew.addQuery('problem_id', current.sys_id);&lt;BR /&gt; vew.query();&lt;BR /&gt; &lt;BR /&gt; while(vew.next()){&lt;BR /&gt; vew.state = '7';&lt;BR /&gt; vew.close_code = 'Solved (Work Around)';&lt;BR /&gt; vew.close_notes = 'The incident is Closed/Resolved';&lt;BR /&gt; vew.update();&lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt;I also attached my docs of this pdi. Please refer this&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;If this solution works for you, please mark it as helpful.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Regards,&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Deepshikha Pandey&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 12:40:38 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/when-any-problem-ticket-closed-then-related-incidents-should/m-p/833293#M405072</guid>
      <dc:creator>Deepshikha 3010</dc:creator>
      <dc:date>2021-05-07T12:40:38Z</dc:date>
    </item>
    <item>
      <title>Re: When any Problem Ticket closed then related incidents should automatically close</title>
      <link>https://www.servicenow.com/community/itsm-forum/when-any-problem-ticket-closed-then-related-incidents-should/m-p/833294#M405073</link>
      <description>&lt;P&gt;&lt;SN-MENTION class="sn-mention" table="live_profile" sysid="17fd60941bb2e8501e579979b04bcbf9"&gt;@Harshad Pasalkar&lt;/SN-MENTION&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why not use Flow Designer with no Scripting&lt;/P&gt;
&lt;P&gt;Example below:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note: Remember to Save and Activate the Flow before you test&lt;/STRONG&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/92584iCD3BD05AD72AF735/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/92583i3373E0315497A565/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/92587i64E41E8147C2C770/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/92585i91B7D803B694E313/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;STRONG&gt;Final Flow Steps&lt;/STRONG&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/92586i2E2FC318A576EAFF/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;Regards&lt;BR /&gt;Ankur&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 12:53:45 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/when-any-problem-ticket-closed-then-related-incidents-should/m-p/833294#M405073</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2021-05-07T12:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: When any Problem Ticket closed then related incidents should automatically close</title>
      <link>https://www.servicenow.com/community/itsm-forum/when-any-problem-ticket-closed-then-related-incidents-should/m-p/833295#M405074</link>
      <description>&lt;P&gt;There is OOB BR that can be used. You don't need to create and just activate this BR.&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/92588i7D0D5F3C08770ABC/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;</description>
      <pubDate>Fri, 07 May 2021 13:05:44 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/when-any-problem-ticket-closed-then-related-incidents-should/m-p/833295#M405074</guid>
      <dc:creator>John Zhang1</dc:creator>
      <dc:date>2021-05-07T13:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: When any Problem Ticket closed then related incidents should automatically close</title>
      <link>https://www.servicenow.com/community/itsm-forum/when-any-problem-ticket-closed-then-related-incidents-should/m-p/833296#M405075</link>
      <description>&lt;P&gt;&lt;SN-MENTION class="sn-mention" table="live_profile" sysid="17fd60941bb2e8501e579979b04bcbf9"&gt;@Harshad Pasalkar&lt;/SN-MENTION&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope you are doing good.&lt;BR /&gt;&lt;BR /&gt;Did my reply answer your question?&lt;BR /&gt;&lt;BR /&gt;If so, please mark appropriate response as correct &amp;amp; helpful so that the question will appear as resolved for others who may have a similar question in the future.&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;Ankur&lt;/P&gt;</description>
      <pubDate>Sat, 08 May 2021 07:30:28 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/when-any-problem-ticket-closed-then-related-incidents-should/m-p/833296#M405075</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2021-05-08T07:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: When any Problem Ticket closed then related incidents should automatically close</title>
      <link>https://www.servicenow.com/community/itsm-forum/when-any-problem-ticket-closed-then-related-incidents-should/m-p/833297#M405076</link>
      <description>&lt;P&gt;&lt;SN-MENTION class="sn-mention" table="live_profile" sysid="17fd60941bb2e8501e579979b04bcbf9"&gt;@Harshad Pasalkar&lt;/SN-MENTION&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why not use OOB Business rule mentioned by &lt;SN-MENTION class="sn-mention" table="live_profile" sysid="b01e06e1dbd41fc09c9ffb651f9619b5"&gt;@John Zhang&lt;/SN-MENTION&gt; ?&lt;/P&gt;
&lt;P&gt;Regards&lt;BR /&gt;Ankur&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 06:10:50 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/when-any-problem-ticket-closed-then-related-incidents-should/m-p/833297#M405076</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2021-05-10T06:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: When any Problem Ticket closed then related incidents should automatically close</title>
      <link>https://www.servicenow.com/community/itsm-forum/when-any-problem-ticket-closed-then-related-incidents-should/m-p/833298#M405077</link>
      <description>&lt;P&gt;Hello Harshad,&lt;/P&gt;
&lt;P&gt;If you want to use&amp;nbsp;OOB Business rule,&lt;/P&gt;
&lt;P&gt;&lt;SN-MENTION class="sn-mention" table="live_profile" sysid="b01e06e1dbd41fc09c9ffb651f9619b5"&gt;@John Zhang&lt;/SN-MENTION&gt;&amp;nbsp;has provided better way to do that.&lt;/P&gt;
&lt;P&gt;Thank You&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 06:17:21 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/when-any-problem-ticket-closed-then-related-incidents-should/m-p/833298#M405077</guid>
      <dc:creator>Prasad Dhumal</dc:creator>
      <dc:date>2021-05-10T06:17:21Z</dc:date>
    </item>
  </channel>
</rss>

