- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2020 03:07 AM
Hi Friends,
Could you please help me to find the below solution.
My requirement : How to send notifications to users selected in List collector variables on catalog items shown below:
below screen is of RITM which shows variable has 3 users selected, so how can we send notification of RITM submition to them?
we could have add notification in workflow but due to some reason we are not supposed to modify the workflow.
Can anyone suggest me how to achieve this requirement, if you provide it in bit details and code(if required) then would be better.
Solved! Go to Solution.
- Labels:
-
Personal Developer Instance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2020 03:12 AM
Hi,
best way is you can use workflow notification activity and in the advanced script get the users and push to answer array
sample script;
answer = current.variables.<listCollectorVariable>.toString().split(',');
another approach would be have after insert BR on sc_req_item table and condition as catalog item is yours; so that it triggers only for your catalog item
create event in event registry for sc_req_item table
create notification on sc_req_item table and associated the event to this notification
ensure below
1) event parm 1 contains recipient checkbox is set to true
2) send to event creator is true
in BR script use this
gs.eventQueue('event_name', current, current.variables.<listCollectorVariable>,'');
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2020 05:43 AM
Hi,
So for example for 10 catalog items you want this; create system property which holds sys_ids of those 10 catalog items
in BR condition check whether current catalog item is belonging to system property
BR Condition: gs.getProperty('catalog_sys_ids').indexOf(current.cat_item) > -1
So this BR will only run for 10 catalog items; I assume the list collector variable name is same across the 10 catalog items
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2020 08:57 PM
Hi Kumar,
Let me know if that answered your question.
If so, please mark my response as ✅ correct & 👍 helpful so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader