Sys_id of ticket where the action originated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2011 06:42 AM
Hi,
I'm looking for an easy way to find the sys_id of the record where the action originated from, from a before insert business rule.
I know this works:
var x = gs.action.getGlideURI().toString();
But that requires me to write a indexOf check to cut the 'sysparm_sys_id' out of there. Plus I am not 100% sure on how these glideURI's are created, and therefore not whether my indexOf will always yield the correct result.
If anyone can help me on this, I'd be much obliged.
Wesley
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-16-2011 11:14 AM
Mike, that was exactly what I was looking for! I tried to use that map functionality a million times, but I never was able to determine the correct parameters to get the 'get' part to work... but you were just spot on! Thanks a million!
That's one less problem, just one more to go 🙂
Regards,
Wesley
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2012 12:55 PM
It seems clear he's looking for the sys_id of the incident he was looking at when he chose to create a new record in the sys_email table. In this case, current is referring to a sys_email object, but he needs information about the incident. I don't know how else to do it except parse the GlideURI's syparm_referring_url string.