- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2022 08:11 AM
Hi. I am trying to learn how to write a simple script in the "Assignment Rule" area. It doesn't really matter what I'm trying to do in the script. What matters is that I can't seem to get any debugging tools to work. I've used session logs and breakpoints when writing code for widgets. However, for assignment rules, nothing seems to work. I've been searching forever and have come up with absolutely nothing. Not a thing. Does anyone know how to do this? Thanks.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2022 08:15 AM
Hello
try putting gs.info() or gs.log().
This should work
MARK THIS ANSWER CORRECT IF THIS HELPS YOU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2022 08:15 AM
Hello
try putting gs.info() or gs.log().
This should work
MARK THIS ANSWER CORRECT IF THIS HELPS YOU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2022 08:17 AM
Hi,
any server side can be debugged using gs.info() statements.
Don't use gs.log() as it will break your code in scoped applications as gs.log() is not supported in scope app.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2022 08:59 AM
Thank you Mohith and Ankur. You have both helped me. I am new to all of this. By using gs.info (you're correct Ankur, gs.log broke my code), it created a marker in the system log, so I could better see where the actual error is. The next record in the system log was the error message. Once I fixed that, everything worked. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2022 02:29 AM
Glad to know that my comment helped you resolve the issue regarding not to use gs.log().
Did you mistakenly marked other response as correct?
Would you mind marking my response as correct?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader