How to pull Delegate from Owner field (dot-walking not possible since Delegate in Related List)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2025 12:01 AM
Hi Experts! 😊
Kindly seeking your expert's advice. We experienced a hiccup when we want to send email notification to delegates where the record has no approval request / task / assignment
- For non-delegation scenario, our email recipient is pulled from "Owner" field.
- When the condition is triggered, which is record updated, Owner should receive email. This is OK and working as expected for non-delegation scenario, but unfortunately, delegates for Owner user cannot receive the email. We suspected this occurred since it is not an assignment. (This is the issue) P/S: Just to set the record straight! To confirm our delegation is added properly, we tested for other records which require approval request / assignment, and it is working expectedly - which is delegates do receive email notification.
We want to try dot-walk the owner field to find "Delegate" column but that is not possible since it is located in separate table with many relationships.
Please advise, as of now, we are totally clueless on how to proceed. Perhaps there is another team also facing the similar problem as ours?
Thank you for your kindness and time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2025 12:09 AM
with your requirement you will have to use business rule and use gs.eventQueue() to trigger the email
In the business rule get the owner, get the delegate for that owner
Append both sysIds and send in event parm1
Then in notification ensure "Event parm1 contains recipient" = True
Something like this in business rule with proper condition
var owner = current.owner;
// query delegate table and get the delegate in delegate variable
var finalRecipient = owner.toString() + ',' + delegate.toString();
gs.eventQueue('event_name', current, finalRecipient);
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2025 12:14 AM
Hi @AdamSaniS
Use "Event Registry" and set the notification trigger condition to "Event fired."
Utilize a Business Rule to fire the event. In the BR script, query the user's active delegates and pass their email IDs as event parameters. Then, in the notification settings, select the checkbox for either "Event parm 1 contains recipient" or "Event parm 2 contains recipient."
Regards,
Siva