Change request editing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2024 12:45 AM
How to edit / change the planned start date of a CR using background scripts .
Please help.
Thanks in advance.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2024 01:11 AM - edited 03-22-2024 01:15 AM
Hi @Siddhant VSK ,
something like this?
var changeGr = new GlideRecord('change_request');
changeGr .get('<change_sys_id>');
var startDate = new GlideDateTime();
var endDate = new GlideDateTime();
endDate.addDaysUTC(10);
changeGr.setValue('start_date', startDate);
changeGr.setValue('end_date', endDate);
changeGr.update();
Regards, Ivan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2024 01:55 AM
Greetings!!
1. May i know why you want to change the plan start date, when change is already in approved state?
2. It is not recommended to change the dates, without moving it to New state, as change date will impact the conflict run as well.
3. It will impact the KPI as well.
Better, log a new change or move the change back to new state, but don't change the date via script.
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]
****************************************************************************************************************