Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

create an error or stop submission during blackout schedule

RBlor
Mega Guru

i have a blackout schedule during a change request period but i would like to make so it displays an error if done during a blackout perioud  or blocks the submission. I was told this could be done via business rule but i dont  know how to go about that. can anyone assist

10 REPLIES 10

Hi @Revanth Karra thank you for the reply. 

 

I recieved the following error: JavaScript parse error at line (1) column (54) problem = missing ; before statement (<refname>; line 1)

the condition written was:
BLACKOUT_START_DATE <= current.planned_start_date AND current.planned_start_date <= BLACKOUT_END_DATE;

 

can you help me with the condition error?

hi @Revanth Karra ,

 

Are you able to assist? this is still an issue and the Condition is not correct

black out start date and black out end date, both of the fields are not available in change request table, please help from where i need to get them 

Blackout schedules are stored in the 'cmn_schedule_blackout' table.

 

The OP hear can view the client script named 'Conflict change' which checks planned_start_date and planned_end_date against the blackout schedules on the change_request record. Create a similar client script, runs onSubmit that has:

 

        //Abort the submission
        return false;

to abort the submission.

Bert_c1
Kilo Patron

There is the "Change Management - Collision Detector" plugin that can work here.

 

see:

 

Schedule Blackout Periods