When or where is the Script Include 'ChangeRequestStateHandler' used

Mudit4
Kilo Expert

I understand that we have Change Models in ServiceNow.

And Change Models can define what states we want and what transitions we want between them. However the documentation for adding a state given here: 

https://docs.servicenow.com/bundle/rome-it-service-management/page/product/change-management/task/t_AddANewState.html

This mentions making changes to the following Script Includes:

1. ChangeRequestStateHandler

2. ChangeRequestStateModel_normal

What is the difference between defining states and transitions in the Change Model and defining transitions in the script includes as mentioned in this documentation? When or where are these Script Includes executed?

Please help me understand this. Thanks

1 ACCEPTED SOLUTION

Abhijit4
Mega Sage

Hi Mudit,

You can find all the references where this script include is called /used. Servicenow has provided us the way to identify all its references. Follow below steps to identify its references.

1.Open "ChangeRequestStateHandler" script include.

2. Right click on name of the script include as shown below.

3. Click on find references option.

find_real_file.png

Once you get its all references then you can debug it further.

Let me know if you have any further question.

Please mark as correct or helpful if it helps.

Thanks and Regards

Abhijit

By marking my response as correct or helpful, you contribute to helping future readers with similar issues.
Regards,
Abhijit
ServiceNow MVP

View solution in original post

2 REPLIES 2

Abhijit4
Mega Sage

Hi Mudit,

You can find all the references where this script include is called /used. Servicenow has provided us the way to identify all its references. Follow below steps to identify its references.

1.Open "ChangeRequestStateHandler" script include.

2. Right click on name of the script include as shown below.

3. Click on find references option.

find_real_file.png

Once you get its all references then you can debug it further.

Let me know if you have any further question.

Please mark as correct or helpful if it helps.

Thanks and Regards

Abhijit

By marking my response as correct or helpful, you contribute to helping future readers with similar issues.
Regards,
Abhijit
ServiceNow MVP

Hi Abhijit, 

Thanks for the answer. This is a very useful feature.

Can you also help me understand the difference between- handling states and transitions- using Change Model and Script Includes?