- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-02-2021 04:44 AM
Hi All,
I have created a Survey which is going to be triggered when the RITM is closed.
I have create a notification to send this survey link to the User.
How can this notification be sent to the user after x days of RITM closure.
Regards,
Abhi
Solved! Go to Solution.
- Labels:
-
Personal Developer Instance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-03-2021 02:32 AM
Hi,
As per your question you want email to be sent x days after RITM is closed
Then your BR, event, notification should be on RITM table
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
‎09-02-2021 05:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-02-2021 09:38 PM
Hi Pranesh,
I have created a notification separately, I want to trigger that notification after 2 days. how can I achieve that I am not aware of these scheduled jobs and events, can you please provide a sample code to look into, the links that you provided are stating about what to do but can you please provide me a sample code for better understanding, if possible.
Regards,
Abhi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-02-2021 09:59 PM
var ps = 7; //days
var pn = parseInt(ps);
var queryTime = new GlideDateTime();
queryTime.addDaysUTC(-pn);
if (pn > 0) {
var gr = new GlideRecord('incident');
gr.addQuery('incident_state', IncidentState.RESOLVED);
if (gs.getProperty('com.snc.incident.autoclose.basedon.resolved_at', 'false') === 'true') {
gr.addQuery('resolved_at', '<', queryTime);
}
else {
gr.addQuery('sys_updated_on', '<', queryTime);
}
if (pm.isActive('com.snc.incident.mim')) {
var mim = gr.addNullQuery('major_incident_state');
mim.addOrCondition('major_incident_state', '!=', new sn_major_inc_mgmt.MajorIncidentTriggerRulesSNC().MAJOR_INCIDENT_STATE.ACCEPTED);
}
gr.query();
while(gr.next()) {
var assess = (new SNC.AssessmentCreation()).createAssessments('sys id of survey');
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-02-2021 10:07 PM
Hi,
Best way is to use flow with no script.
Example:
1) Flow Triggers when RITM is created
2) Then use Wait for Duration logic and specify hours
1 day = 24 hours
x days = 24*x hours
3) then use Send Email Action and send the email
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader