Notify Employee Before 2 days of End Date in Catalog Item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 05:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 05:54 AM
Hi,
You can write a scheduled job that runs once a day, checks all Active tickets created by that catalog item and looks if the variable due date is 2 days from now, send an email for the tickets that come in the result set.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 06:06 AM
I am trying to figure out filter condition on SC_REQ_ITEM table in order to find variable names "End Date" & "Employee Name" but couldn't find any way to do that.
Can you please provide filter condition screenshot or way of doing it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 06:12 AM - edited 03-06-2024 06:13 AM
Try this
var getData = new GlideRecord('sc_req_item');
getData.addEncodedQuery('cat_item=<catalog item sys_id>^variables.<Variable Sys_id>RELATIVEGT@dayofweek@ahead@1^variables.<Variable Sys_id>RELATIVELT@dayofweek@ahead@3^active=true');
getData.query()
while(getData.next())
{
//do whatever
}
Add the right catalog item sys_id and variable sys id
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 05:56 AM
This will be helpful.
You can use Flow
Trigger
Action
Look up record
Due date relative 2 days before
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]
****************************************************************************************************************