I have a requirement to add one option called last 83 days in interactive filter under opened field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2024 04:57 AM
Hi Guys,
I need to add one option called 83 days under date filter options.
Please help me with the solution.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2024 07:14 AM
Hi,
I need to send like follow-up notification on 83rd day and after 7 days from follow-up notification needs to resolved automatically.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2024 07:25 AM
I hope you will have some other validations than '83 days after creation' (what if it's still being worked on, or has updates pending/changes waiting/problems attached), but per your requirement, create a scheduled job that runs daily and checks on the 83 days after creating:
// Calculate the date 83 days ago
var grDateTime = new GlideDateTime();
grDateTime.addDaysUTC(-83);
var date83DaysAgo = grDateTime.getDate();
// Query for incidents created exactly 83 days ago
var grIncident = new GlideRecord('incident');
grIncident.addQuery('opened_at', date83DaysAgo);
PLEASE add other conditions as well (like active is true, not updated on last x days, etc)
grIncident.query();
while (grIncident.next()) {
// Perform your validation logic for each incident
gs.info("Validating Incident: " + grIncident.number);
create event to trigger notification
}
}
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2024 07:38 AM
You can use the flow designer as well for the same.
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
02-06-2024 07:42 AM
Please tell me how we can give condition in flow, opened is 83 days ?