how to debug business rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-03-2015 02:20 AM
hi every one,
I am new in service now could any one let me know the best way to debug business rule in snow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-03-2015 02:45 AM
There are several ways to do this, but an easy way:
- as "admin" navigate to Session Debug -> Debug Business Rule
Another way is to add gs.log statements in the BR code and they will be visible after the BR runs on logs.
Regards,
Sergiu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-03-2015 02:57 AM
You can also use
as "admin" navigate to Session Debug -> Debug Business Rule(details)
This give in detail debugging option
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-03-2015 02:58 AM
Hi Diwakar,
please go through below links :
Debugging Business Rules - ServiceNow Wiki
Debugging Tools Best Practices - ServiceNow Wiki
These links will provide you more knowledge on how to debug Business rule.
Thanks & Regards
Govind Kumar Sharma

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-03-2015 09:54 AM
Usually one of my last resorts when debugging any script is to run them in Background Scripts.
You do need to change some things, for example, instead of using any "current" you will need to set a GlideRecord for that table and then use that variable in place of all your current objects.
Then I add gs.print commands along the script to let me know "the script got to line 2", or "the current query contains XXX records".
Since I go step by step into the script I always am able to determine where the problem is.