- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2021 12:39 AM
Hi All,
After creating the change request with planned start date and planned end date fields. Automatically populate these dates in all change tasks.
Thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2021 11:01 PM
Are you saying you want those fields to be auto-populated when change_task is created?
if yes then you can use before insert BR on change_task and set the fields
(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);
OR
You can also use flow designer to set the fields with no script
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2021 12:50 AM
Hi Gouse,
You could try below BR.
(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);
Please mark correct/helpful if applicable.
Regards,
Shubham
Shubham Tipnis
ServiceNow Enthusiast
⭐️ 3x Rising Star (2022–2024) – ServiceNow Community
Sharing insights, use cases & real-world learnings from the Now Platform
Always learning. Always building.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2021 01:02 AM
Hi shubham,
thanks for your replay. I have try this BR but should not populated.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2021 01:27 AM
Hi Gouse,
Check if the fields are populated with the dates after you save/submit the record. Those fields won't be populated until you click submit. The previous code works as display business rule.
Regards,
Shubham
Shubham Tipnis
ServiceNow Enthusiast
⭐️ 3x Rising Star (2022–2024) – ServiceNow Community
Sharing insights, use cases & real-world learnings from the Now Platform
Always learning. Always building.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2021 02:24 AM
Hi
Maybe
The Business Rule, that he mentioned will copy the Start and End Date on every NEW or CHANGED "Change Task" as it is touched.
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.
THAT BR should loop through all "Change Tasks" related to the "Change Request" and update each record.
Does that make sense to your question?
Does that match what you are trying to achieve?
Let me know if that answers your question and mark my answer as correct and helpful.
BR
Dirk