How to debug a form load to see what rules/scripts are applied

Greg92
Giga Contributor

Hi,

A previous developer added some scripts/rules to the Project form, so it removes all project states and adds only Pending and Request Approval states. When the forms loads, I can see all states for couple of seconds, then something applies and all gets changed. I need to revert this logic back to the "out of the box" functionally - simply display all states without any approval enforcement. I've gone through UI Policies, Scripts, Business Rules, but could not find anything which changes the State dropdown.

Is there any trick/tool I can use to find out what rules/scripts are applied on onLoad event of the form?

Thank youfind_real_file.png

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

So basically you can have field watch on that field.

Once you do that you can reload the form and it would show all the client scripts and UI policies working on that field

1) right click the field

2) click Watch

3) then you will see the field watcher and debugger in bottom

4) now reload the form

5) once you reload check the javascript log section

you will see list of client script and UI policies

find_real_file.png

find_real_file.png

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

So basically you can have field watch on that field.

Once you do that you can reload the form and it would show all the client scripts and UI policies working on that field

1) right click the field

2) click Watch

3) then you will see the field watcher and debugger in bottom

4) now reload the form

5) once you reload check the javascript log section

you will see list of client script and UI policies

find_real_file.png

find_real_file.png

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Thanks Ankur, it solved my issue too.