- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Im trying to schedule a assessment to be sent every quarter. I have set up the assessment and also the scheduled job but it doesn't seem to send at all. Can anyone help?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
assessment has to be created against some record.
in your script you are just calling the API with survey sysId but no GlideRecord object
try this in background script and then add this logic in scheduled job which runs quaterly
triggerSurvey();
function triggerSurvey() {
try {
var gr = new GlideRecord("core_company");
gr.addEncodedQuery("Your Query");
gr.query();
while (gr.next()) {
new SNC.AssessmentCreation().createAssessments('Survey Definition SysId', gr.getUniqueValue(), 'Your User Sys ID to whom it has to go');
}
} catch (ex) {
gs.info(ex);
}
}
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
assessment has to be created against some record.
in your script you are just calling the API with survey sysId but no GlideRecord object
try this in background script and then add this logic in scheduled job which runs quaterly
triggerSurvey();
function triggerSurvey() {
try {
var gr = new GlideRecord("core_company");
gr.addEncodedQuery("Your Query");
gr.query();
while (gr.next()) {
new SNC.AssessmentCreation().createAssessments('Survey Definition SysId', gr.getUniqueValue(), 'Your User Sys ID to whom it has to go');
}
} catch (ex) {
gs.info(ex);
}
}
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
