<?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: Need to populate Planned start date and planned end date in change task  from change request. in ITSM forum</title>
    <link>https://www.servicenow.com/community/itsm-forum/need-to-populate-planned-start-date-and-planned-end-date-in/m-p/858179#M429958</link>
    <description>&lt;P&gt;Hi Gouse,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could try below BR.&lt;/P&gt;
&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;(function executeRule(current, previous /*null when async*/) {
	
	var parentChange = current.change_request.getRefRecord();
	
	if (parentChange.isValidRecord()) {
		current.planned_start_date = parentChange.start_date;
		current.planned_end_date = parentChange.end_date;
	}


})(current, previous);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Please mark correct/helpful if applicable.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Shubham&lt;/P&gt;</description>
    <pubDate>Sun, 23 May 2021 07:50:29 GMT</pubDate>
    <dc:creator>Shubham Tipnis</dc:creator>
    <dc:date>2021-05-23T07:50:29Z</dc:date>
    <item>
      <title>Need to populate Planned start date and planned end date in change task  from change request.</title>
      <link>https://www.servicenow.com/community/itsm-forum/need-to-populate-planned-start-date-and-planned-end-date-in/m-p/858178#M429957</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;After creating the change request with planned start date and planned end date fields. Automatically populate these dates in all change tasks.&lt;/P&gt;
&lt;P&gt;Thanks in advance&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 May 2021 07:39:53 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/need-to-populate-planned-start-date-and-planned-end-date-in/m-p/858178#M429957</guid>
      <dc:creator>Gouse</dc:creator>
      <dc:date>2021-05-23T07:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: Need to populate Planned start date and planned end date in change task  from change request.</title>
      <link>https://www.servicenow.com/community/itsm-forum/need-to-populate-planned-start-date-and-planned-end-date-in/m-p/858179#M429958</link>
      <description>&lt;P&gt;Hi Gouse,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could try below BR.&lt;/P&gt;
&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;(function executeRule(current, previous /*null when async*/) {
	
	var parentChange = current.change_request.getRefRecord();
	
	if (parentChange.isValidRecord()) {
		current.planned_start_date = parentChange.start_date;
		current.planned_end_date = parentChange.end_date;
	}


})(current, previous);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Please mark correct/helpful if applicable.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Shubham&lt;/P&gt;</description>
      <pubDate>Sun, 23 May 2021 07:50:29 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/need-to-populate-planned-start-date-and-planned-end-date-in/m-p/858179#M429958</guid>
      <dc:creator>Shubham Tipnis</dc:creator>
      <dc:date>2021-05-23T07:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: Need to populate Planned start date and planned end date in change task  from change request.</title>
      <link>https://www.servicenow.com/community/itsm-forum/need-to-populate-planned-start-date-and-planned-end-date-in/m-p/858180#M429959</link>
      <description>&lt;P&gt;Hi shubham,&lt;/P&gt;
&lt;P&gt;thanks for your replay. I have try this BR but should not populated.&lt;/P&gt;</description>
      <pubDate>Sun, 23 May 2021 08:02:47 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/need-to-populate-planned-start-date-and-planned-end-date-in/m-p/858180#M429959</guid>
      <dc:creator>Gouse</dc:creator>
      <dc:date>2021-05-23T08:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Need to populate Planned start date and planned end date in change task  from change request.</title>
      <link>https://www.servicenow.com/community/itsm-forum/need-to-populate-planned-start-date-and-planned-end-date-in/m-p/858181#M429960</link>
      <description>&lt;P&gt;Hi Gouse,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check if the fields are populated with the dates &lt;STRONG&gt;after&lt;/STRONG&gt; you save/submit the record. Those fields won't be populated until you click submit. The previous code works as display business rule.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Shubham&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 May 2021 08:27:10 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/need-to-populate-planned-start-date-and-planned-end-date-in/m-p/858181#M429960</guid>
      <dc:creator>Shubham Tipnis</dc:creator>
      <dc:date>2021-05-23T08:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: Need to populate Planned start date and planned end date in change task  from change request.</title>
      <link>https://www.servicenow.com/community/itsm-forum/need-to-populate-planned-start-date-and-planned-end-date-in/m-p/858182#M429961</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;Maybe &lt;SN-MENTION class="sn-mention" table="live_profile" sysid="a633d778dbb3641092bb0b55ca961946"&gt;@Shubham Tipnis&lt;/SN-MENTION&gt;&amp;nbsp;should mention, that the Busines Rule should be created on the "CHANGE TASK" table and NOT on the "CHANGE Request" Table.&lt;/P&gt;
&lt;P&gt;The Business Rule, that he mentioned will copy the Start and End Date on every NEW or CHANGED "Change Task" as it is touched.&lt;/P&gt;
&lt;P&gt;But if you want to "write down" the "Start" and "End" Date also to all EXISTING Change Tasks as soon as you change the "Change Request", you need to add an additional Business Rule on the "Change Request" table as well.&lt;/P&gt;
&lt;P&gt;THAT BR should loop through all "Change Tasks" related to the "Change Request" and update each record.&lt;/P&gt;
&lt;P&gt;Does that make sense to your question?&lt;/P&gt;
&lt;P&gt;Does that match what you are trying to achieve?&lt;/P&gt;
&lt;P&gt;Let me know if that answers your question and mark my answer as correct and helpful.&lt;/P&gt;
&lt;P&gt;BR&lt;BR /&gt;Dirk&lt;/P&gt;</description>
      <pubDate>Sun, 23 May 2021 09:24:52 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/need-to-populate-planned-start-date-and-planned-end-date-in/m-p/858182#M429961</guid>
      <dc:creator>DirkRedeker</dc:creator>
      <dc:date>2021-05-23T09:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: Need to populate Planned start date and planned end date in change task  from change request.</title>
      <link>https://www.servicenow.com/community/itsm-forum/need-to-populate-planned-start-date-and-planned-end-date-in/m-p/858183#M429962</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can as well try the following in the default value:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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/92512i4632EF8A6A9DA3E0/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;Mark &lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt; Correct/helpful, if applicable, Thanks!!&lt;/P&gt;
&lt;P&gt;Aman&lt;/P&gt;</description>
      <pubDate>Mon, 24 May 2021 05:41:29 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/need-to-populate-planned-start-date-and-planned-end-date-in/m-p/858183#M429962</guid>
      <dc:creator>Aman Singh_</dc:creator>
      <dc:date>2021-05-24T05:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: Need to populate Planned start date and planned end date in change task  from change request.</title>
      <link>https://www.servicenow.com/community/itsm-forum/need-to-populate-planned-start-date-and-planned-end-date-in/m-p/858184#M429963</link>
      <description>&lt;P&gt;&lt;SN-MENTION class="sn-mention" table="live_profile" sysid="80ce82addbd41fc09c9ffb651f96194a"&gt;@Gouse&lt;/SN-MENTION&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you saying you want those fields to be auto-populated when change_task is created?&lt;/P&gt;
&lt;P&gt;if yes then you can use before insert BR on change_task and set the fields&lt;/P&gt;
&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;(function executeRule(current, previous /*null when async*/) {

	// Add your code here
	current.start_date = current.change_request.start_date;
	current.end_date = current.change_request.end_date;

})(current, previous);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;OR&lt;/P&gt;
&lt;P&gt;You can also use flow designer to set the fields with no script&lt;/P&gt;
&lt;P&gt;Regards&lt;BR /&gt;Ankur&lt;/P&gt;</description>
      <pubDate>Mon, 24 May 2021 06:01:56 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/need-to-populate-planned-start-date-and-planned-end-date-in/m-p/858184#M429963</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2021-05-24T06:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: Need to populate Planned start date and planned end date in change task  from change request.</title>
      <link>https://www.servicenow.com/community/itsm-forum/need-to-populate-planned-start-date-and-planned-end-date-in/m-p/858185#M429964</link>
      <description>&lt;P&gt;Thanks Ankur for your replay.&lt;/P&gt;
&lt;P&gt;it is working fine with my below script&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Async insert BR on change request table&amp;nbsp;&lt;/P&gt;
&lt;P&gt;var ch_task = new GlideRecord('change_task');&lt;BR /&gt;ch_task.addQuery('change_request',current.sys_id);&lt;/P&gt;
&lt;P&gt;ch_task.query();&lt;BR /&gt;while(ch_task.next()){&lt;BR /&gt;ch_task.planned_start_date = current.start_date;&lt;BR /&gt;ch_task.planned_end_date = current.end_date;&lt;BR /&gt;ch_task.update();&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Mon, 24 May 2021 13:35:02 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/need-to-populate-planned-start-date-and-planned-end-date-in/m-p/858185#M429964</guid>
      <dc:creator>Gouse</dc:creator>
      <dc:date>2021-05-24T13:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: Need to populate Planned start date and planned end date in change task  from change request.</title>
      <link>https://www.servicenow.com/community/itsm-forum/need-to-populate-planned-start-date-and-planned-end-date-in/m-p/858186#M429965</link>
      <description>&lt;P&gt;Thanks for your replay.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 May 2021 13:36:48 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/need-to-populate-planned-start-date-and-planned-end-date-in/m-p/858186#M429965</guid>
      <dc:creator>Gouse</dc:creator>
      <dc:date>2021-05-24T13:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: Need to populate Planned start date and planned end date in change task  from change request.</title>
      <link>https://www.servicenow.com/community/itsm-forum/need-to-populate-planned-start-date-and-planned-end-date-in/m-p/858187#M429966</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;your BR is async insert on change request.&lt;/P&gt;
&lt;P&gt;What if there are no change tasks for that CHG?&lt;/P&gt;
&lt;P&gt;by default CHG Task will be created post CHG Request; so not sure how the change tasks would be present as soon as CHG is created&lt;/P&gt;
&lt;P&gt;Regards&lt;BR /&gt;Ankur&lt;/P&gt;</description>
      <pubDate>Mon, 24 May 2021 13:37:36 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/need-to-populate-planned-start-date-and-planned-end-date-in/m-p/858187#M429966</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2021-05-24T13:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need to populate Planned start date and planned end date in change task  from change request.</title>
      <link>https://www.servicenow.com/community/itsm-forum/need-to-populate-planned-start-date-and-planned-end-date-in/m-p/858188#M429967</link>
      <description>&lt;P&gt;yes i got your point and try our code its working&lt;/P&gt;
&lt;P&gt;thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 May 2021 13:51:59 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/need-to-populate-planned-start-date-and-planned-end-date-in/m-p/858188#M429967</guid>
      <dc:creator>Gouse</dc:creator>
      <dc:date>2021-05-24T13:51:59Z</dc:date>
    </item>
  </channel>
</rss>

