On change request, planned start date should always be 24 hours ahead of current time.

prabhmeet
Giga Expert

 Hi,

I am new to ServiceNow and still learning. Can anyone help me with this requirement- On change request, planned start date should always be 24hrs ahead of current time.

I do not know how to do this. I hope someone can help.

1 ACCEPTED SOLUTION

Narendra Kota
Mega Sage

Hi,

you can write a before insert, update business rule.

Condition: current.planneddatefield.changes()

Script:

(function executeRule(current, previous /*null when async*/) {

if(current. planneddatefield<= gs.daysAgo(-1)) {

current.setAbortAction(true);

gs.addInfoMessage("The planned start date must be more than 1 calendar days in the future.");
}

})(current, previous);

 

Mark my answer as correct or helpful if it helped.

View solution in original post

5 REPLIES 5

I want the date to be set automatically, and it should always be 24 hours ahead of the current time.