- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2024 11:29 PM
Hi all, so how to trigger a Mail notification to respective support team 1 or support team 2, when incident is pending with "Inactive" members.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2024 04:56 AM
Hi @Sharath807 ,
Create Event as Follows:
To work on past/existing records you may write fix script as follows:
var gr = new GlideRecord('incident');
gr.addEncodedQuery('active=true^assigned_toISNOTEMPTY')
gr.query();
while(gr.next())
{
if(gr.assigned_to.active == false)
{
gs.eventQueue('Inactive User Notification', gr , gr.number, gr.short_description);
}
}
For further inactivation of users you may write business rule as follows:
Type : before->Update
condition: active -> changes to -> false
script:
Please mark my response as correct and helpful if it helped solved your question.
Thanks,
Rohit Suryawanshi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2024 12:20 AM
you want to trigger notification for past data. Or like from now onwards you want to trigger nitification if assigned-to changes to inactive?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2024 12:26 AM
@Community Alums in both the cases.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2024 12:38 AM
Create a new flow and run that.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2024 01:24 AM
for past data create a ON-DEMAND schedule job or background script and and fire event which will trigger notification.
for future - create a business rule and fire same event if assigned changes to inactive.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2024 01:31 AM
@Community Alums am new to scripting , can you provide sample script of it.