How to set an email notification when expiring/end date is approaching?

skendy
Tera Expert

Hi,

I have a custom table which is in relationship with the pm_project table.

It populates the alert (a kind of critical issue) for the project. The alerts have also two fields: start date & end date.

How to create a notification rule (email type) to let the specific user that the end day is approaching?

I read this similar thread (Knowledge Base Article Expiration Notification), but I wanted to ask if there was any way without event scripting...

Thanks,

Skender

1 ACCEPTED SOLUTION

Form the query on the table and filter and get the sample results.. Once done, copy the query and make use of it in a encoded query.


View solution in original post

18 REPLIES 18

It works, partially! But most of the work is done.


Thanks a lot!



But it keeps all the alerts expired also in the past (it should be smth in the addQuery condition).


How to put the right condition: 'which expires in the next 14 days from the alert's end day'?


Form the query on the table and filter and get the sample results.. Once done, copy the query and make use of it in a encoded query.


Already done!


It is OK now with (I changed the query in 'from today to the end of next week')


ctr.addEncodedQuery("u_alert_endBETWEENjavascript:gs.daysAgoStart(0)@javascript:gs.endOfNextWeek()");



But i still do not receive the same results as when I execute e report with the same filter...


And what does this flag phrase mean: "Event parm 1/2 contains recipient"?


while generating the event, you may make use of the parameters to specify the recipients of the emails .



http://wiki.servicenow.com/index.php?title=GlideSystem#eventQueue.28String.2C_Object.2C_String.2C_St...



Example in the link uses the first parameter to specify the recipient.


Perfectly clear now!


The reason I got different results form the report with the same filter applied was because some users didn't have an email address so the didn't receive the notification...



Thanks a lot for your explanations!


I enjoyed this part of ServiceNow!


Skender