sys_email instance variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
I'm having a problem where I try to get the value of the instance variable from a business rule on Insert of the table sys_email when an email is recieved.
I found that the value isn't defined after some updates, so I changed the business rule, but the sys_email is updated 4 times.
I'd like to know why ServiceNow does so many updates on the sys_email registry.
(function executeRule(current, previous /*null when async*/) {
if(current.instance) gs.log("id ritm: "+current.instance.toString());
else gs.log("INSTANCE NOT ASSIGNED");
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hey @Adrià M ,
have you tried current.getDisplayValue('instance') ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
what's your business requirement here?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader