Notify Employee Before 2 days of End Date in Catalog Item

PratikshaAbhang
Tera Contributor

Hi ServiceNow Community,

I'm in need of some help with a Maintain Item.

 my requirement is  : End Date is 10 march then send email 2 days before[8 March] to Employee Name 

 

Thanks,

Pratiksha

 

 

4 REPLIES 4

Anurag Tripathi
Mega Patron
Mega Patron

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.

 

-Anurag

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?

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 

-Anurag

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @PratikshaAbhang 

 

https://www.servicenow.com/community/developer-forum/send-notification-only-15-days-before-the-due-d...

 

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]

****************************************************************************************************************