Change request editing

Siddhant VSK
Tera Contributor

How to edit / change the planned start date of a CR using background scripts .

Please help.

Thanks in advance.

 

SiddhantVSK_0-1711093465099.png

 

2 REPLIES 2

Ivan Betev
Mega Sage
Mega Sage

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

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Siddhant VSK 

 

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]

****************************************************************************************************************