3. Set the state to "Awaiting Change" when a Change is created from the incident using the existing "Create Normal Change" and "Create Emergency Change" UI actions.

anilkumar8
Tera Contributor

3. Set the state to "Awaiting Change" when a Change is created from the incident using the existing "Create Normal Change" and "Create Emergency Change" UI actions.

16 REPLIES 16

this code will put the change record to 'cancelled' state.

Miguel Donayre
ServiceNow Employee
ServiceNow Employee

do you mean set the incident on hold field to "awaiting change" when one of those UI actions is clicked?

Hello Miguel,

Yes that is correct. The INC state must change to "awaiting change" when UIAction is clicked.

Can you let me know how to get this done?

Many thanks,

Kingstan.

Hi Kingstan,

 

You can insert the below code in the Create Normal Change and Create Emergency Change UI Action just after the line "changeRequest.insert();"

current.setValue('state',4); 
current.update();

 

Many thanks.