- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2016 10:20 AM
I'm having a hard time finding the source of an update to a record. I have identified a condition that I can use in a business rule on update of the table, and that allows me to abort the unwanted update. However, it would really be nice if there was an API function I could call that would give me some information about the call stack at that point. The only thing I've been able to find is GlideLog.dumpStack, but when I make that call, the result is undefined.
There is no error at this point, so try catch is not applicable. The goal is to know what piece of code has updated the field on the record that is creating the unwanted update.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2016 10:57 AM
This was given by ServiceNow folks for a HI ticket raised by us recently.
try {
throw new Packages.java.lang.Throwable();
} catch (e) {
gs.log(e,'change_approvers');
gs.log(Packages.com.glide.util.Log.getStackTrace(e),'change_approvers');
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2016 10:57 AM
This was given by ServiceNow folks for a HI ticket raised by us recently.
try {
throw new Packages.java.lang.Throwable();
} catch (e) {
gs.log(e,'change_approvers');
gs.log(Packages.com.glide.util.Log.getStackTrace(e),'change_approvers');
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2016 09:06 PM
Thanks alot for sharing Kalai, this worked great and helped me identify the culprit code.
-Andy