Notification has to be sent out exactly before 30 days
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2024 12:21 AM
Hi Team,
I have requirement, that i need to send notification exactly before reassessment date. Could you please help me on this. ?i have tried this in encodedquery '
Thanks in Advance!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2024 12:36 AM
Hello,
I think you can do with event creation, please check similar threads.
Regards,
Musab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2024 12:51 AM - edited 03-20-2024 01:02 AM
Hi @Mounika M,
Check out this
when i copy the query it's give me
opened_atRELATIVEGT@dayofweek@ahead@30
as I don't have u_reassessment_date so I used the opened_at
// Create a new GlideRecord object for your table
var gr = new GlideRecord('your_table_name');
// Add a filter condition for the reassessment date
gr.addEncodedQuery('opened_atRELATIVEEE@dayofweek@ahead@30');
// Execute the query
gr.query();
// Loop through the records
while (gr.next()) {
// Do something with the records, such as sending notifications
// For example:
gs.info('Send notification for record with ID: ' + gr.sys_id);
}
Please hit helpful and accept this as a solution if it solved your problem.
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2024 12:59 AM
Where do you want to apply this filter?I would suggest to apply in business rule and trigger the event to send notification, below code example:
var gr = new GlideRecord('[Your_Table_Name]');
gr.addEncodedQuery('u_reassessment_dateRELATIVEEE@dayofweek@ahead@30');
gr.query();
// Loop through matching records
while (gr.next()) {
// Send notification for each record asynchronously using gs.eventQueue()
gs.eventQueue('send_notification', null, gr);
}
Please Mark ✅Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.
Thanks