- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2023 11:03 AM
I want to send the reminder email to the user if user has not filled the survey till 3rd day of incident resolution.
I have already created the reminder notification and event but not sure in phow to write schdule job on it as not sure in which table does survey response gets saved so unable to glide that table.
Please tell me the table name and help me with the script
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2023 11:54 AM - edited 07-30-2023 11:56 AM
@VIKAS MISHRA Survey records are present in Assessment Instance table. So you have to create event & notification on Assessment Instance table first then create a schedule job.
Follow below steps which are present in https://www.servicenow.com/community/now-platform-forum/how-to-send-the-reminder-notification-survey...
Steps below
- Create a new Event (Event > Registry) on Assessment Instance table
- Create a new Email > Notification for the assessment instance table) and associate the above event
Ensure your notification has
- Send to event Creator true
- Event parm1 contains recipient as true
- Create schedule job which runs daily and checks the records and sends notification to the user
Script:
sendNotification();
function sendNotification(){
try{
var grSurvey = new GlideRecord('asmt_assessment_instance');
grSurvey.addEncodedQuery('stateINready,wip^userISNOTEMPTY');
grSurvey.query();
while (grSurvey.next()) {
grSurvey.eventQueue('event_name', grSurvey, grSurvey.user, '');
}
}
catch(ex){
gs.info(ex);
}
}
If I could help you with your Query then, please hit the Thumb Icon and mark as Correct !!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2023 11:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2023 11:43 AM
The url provided by you is saying "The item you are trying to access is not available."
So not getting any answer there
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2023 11:54 AM - edited 07-30-2023 11:56 AM
@VIKAS MISHRA Survey records are present in Assessment Instance table. So you have to create event & notification on Assessment Instance table first then create a schedule job.
Follow below steps which are present in https://www.servicenow.com/community/now-platform-forum/how-to-send-the-reminder-notification-survey...
Steps below
- Create a new Event (Event > Registry) on Assessment Instance table
- Create a new Email > Notification for the assessment instance table) and associate the above event
Ensure your notification has
- Send to event Creator true
- Event parm1 contains recipient as true
- Create schedule job which runs daily and checks the records and sends notification to the user
Script:
sendNotification();
function sendNotification(){
try{
var grSurvey = new GlideRecord('asmt_assessment_instance');
grSurvey.addEncodedQuery('stateINready,wip^userISNOTEMPTY');
grSurvey.query();
while (grSurvey.next()) {
grSurvey.eventQueue('event_name', grSurvey, grSurvey.user, '');
}
}
catch(ex){
gs.info(ex);
}
}
If I could help you with your Query then, please hit the Thumb Icon and mark as Correct !!