- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2022 09:32 PM
Hello Guys,
For the above approach we can use schedule job but my question, we want to check record by record suppose lets say we have 10 records which meets the condition( end date is exactly equal to 15 days from current date) then we must send 10 notifications ( each record one notification)
Can anyone give me some idea how to send notification from each record when it meets the condition( i have to include the several record specific data in the Notification )
Thanks,
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2022 10:34 PM
Hi,
the encoded query I gave checks if end date is after 15 days from now and before 16 days from now
so it should give exact 15 days
If that doesn't work you can iterate and find the difference in days between now time and the end date and if it is 15 then send email
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2022 10:15 PM
Hi,
you can use flow designer for this with no script
Query would be something like this
end_dateRELATIVEGT@dayofweek@ahead@15^end_dateRELATIVELT@dayofweek@ahead@16
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2022 10:26 PM
Yes, Here i want to check each records and send one notification per record to their business owners
ex: if 10 records met the condition then send 10 notifications should be sent( one record 1 notification)
I cant use "Relative" query because i am checking whether the end date is exactly equal to 15 days not above 15 days
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2022 10:34 PM
Hi,
the encoded query I gave checks if end date is after 15 days from now and before 16 days from now
so it should give exact 15 days
If that doesn't work you can iterate and find the difference in days between now time and the end date and if it is 15 then send email
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2022 11:32 PM
Thank you for marking my response as helpful.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader