
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2022 10:33 PM
I would like to be able to generate a notification when someone returns an asset.
Wondering how I can automate it to the correct person after their name has been removed from the field already.
EG:
Joe Bloggs is the person in the assigned_to field for asset xyzabc
Joe returns the asset and is removed from the field (it remains blank) and the asset is updated, at this point I'd like a notification sent to Joe Bloggs advising that he has returned the asset - sort of like a receipt in case later someone asks him where it is, he can prove he returned it.
Ideas?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2022 11:37 PM
please use previous object in BR script
(function executeRule(current, previous /*null when async*/) {
gs.eventQueue('asset.assigned.removed', current, previous.assigned_to.email.toString());
})(current, previous);
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2022 11:37 PM
please use previous object in BR script
(function executeRule(current, previous /*null when async*/) {
gs.eventQueue('asset.assigned.removed', current, previous.assigned_to.email.toString());
})(current, previous);
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2022 11:44 PM
Thank you very much @Ankur Bawiskar that worked perfectly 🙂
@Ankur Bawiskar Do you know of a way to prompt for an email address that can then be used to send the notification to? In this case it would be to add a personal email address for someone who is leaving the organisation.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2022 11:09 PM
In BR you can write something like this and call event in notification.
Feel free to mark both solution as correct
Regards,
Musab