- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 02:09 AM
Hi all,
i have a requirement to populate the start/end date from the change to all new(manually) created CTASKs.
i created a client script (for testing i only used start date first) for this but i think im missing something..
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 08:00 AM
Hi @jean-pauldehaas ,
Sure! See below for the Script Include:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2023 03:40 AM
You have a missing closed '}' curly brace in your script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 02:59 AM
If i say from my experience it is not a good practice to set start /end date from change to task. Reason begin the change has buffer time and back out time as well but if you copy the same for all task then user need to make changes manually if need any modification and practically it is not possible all the task start at same time for all task.
Instead of this have a validation that (OOTB available), task dates cant be outside the plan /end date of change.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 04:24 AM
you can use before insert BR on change_task and fetch it from change request field
something like this
current.planned_start_date = current.change_request.start_date;
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 04:52 AM
Hi Ankur,
i have this working already but this only works for CTASKs that are created automatically when the change moves to implement phase.
i need it to also work when users create manual CTASKS

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 04:38 AM - edited 11-14-2023 04:41 AM
I agree with @Dr Atul G- LNG that you might want to rethink this as it may not be as beneficial as it looks on the surface.
However, if you do want to do this, I would consider using a Business Rule instead of a client script. Something like the following on the change_task table should work:
NOTE: the set the values, you'll need to click the "Related Lists" link on the value side of the set field values before you will see the option to pick the Change Request Planned Start Date. See example below:
I've only quickly tested this, but it looks good at first glance.
the benefit of using a Business Rule is the logic is done on the server instead of the client, and in this example, there is no code needed to accomplish the goal.