ServiceNow Troubleshooting · LessonReviewed by Sneha I, ServiceNow Trainer, 8 yrs · Updated · Published · current release · fixes
ServiceNow Debugging business rules
Why a rule did not fire, and how to find out.
Quick answer
When a ServiceNow business rule misbehaves, check five things before rewriting it: that the when, before, after or async, and the condition both match the case; the order field, since a lower-order rule may change the data first; gs.info() logging against the system log; that the rule is active and in the right scope; and recursion from current.update().
When a business rule misbehaves, work through this checklist.
- Confirm the When (before/after/async) and the condition match.
- Check the order field, a lower-order rule may change data first.
- Add
gs.info()logging and watch the system log. - Verify the rule is active and in the right scope.
- Watch for recursion from
current.update().
Try it YourselfJavaScript
▸ Press Run to execute.
Runs in a sandbox in your browser. Mock gs and GlideRecord and sample data are provided.
Practise this on your own free instance.