Can you use previous on a notification?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2024 12:54 AM
On a notification, I only want it to trigger if the following conditions are met:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2024 12:51 AM
Do you mean like this:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2024 01:05 AM
3rd parameter should be user sysId so it should be this
I hope you have marked Event parm1 contains recipient checkbox as True on notification
gs.eventQueue('lbg.notify.reassignBAS', current, previous.u_cmdb_data_steward, current.u_cmdb_data_steward.getDisplayValue());
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
01-09-2024 01:19 AM
I've tried that and it's not generating an event.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2024 01:27 AM
When it comes to my notification, how would I get the display name of the previous owner?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2024 01:30 AM
To whom email should be sent? the current user right present in that field?
are you saying you want to send email to the previous user?
If you wish to send to current user present in u_business_owner field then update as this
gs.eventQueue('lbg.notify.reassignBAS', current, current.u_cmdb_data_steward, previous.u_cmdb_data_steward.getDisplayValue());
Then in your email body wherever you wish to access the previous user use event.parm2 and not event.parm1 since we are sending it in 2nd parm
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