Is there a way to just have a scoped application table for Surveys?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2024 07:09 AM
I have a custom scoped application that inherits from the incident table and provides the incident functionality. This is done so to restrict multiple departments using the same instance and need different choices, categories etc.
We have a requirement where the client wants surveys in the email notifications that are sent when a ticket in this incident system is closed.
Is there a way to create a survey just for this custom-scoped application and have the responses stored in a custom table in this scoped application so that we can give our clients limited access to just this application?
Thank you in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2024 07:34 AM
Hi Navaneeth,
Here is what I found for you to sent email notification when an incident is closed
- Make sure the repeat interval of trigger condition is all set to oo.
- Incident Survey Notification can be used and furthermore, a below email script should be created and attached to the notification email scripts of the Incident Survey Notification.
- Email Script = incident_survey_link
(function runMailScript(current, template, email, email_action, event) {
gs.log("KO: current.getUniqueValue(): " + current.getUniqueValue());
var gr = new GlideRecord('asmt_assessment_instance');
gr.addQuery('task_id', current.getUniqueValue());
gr.setLimit(1);
gr.orderByDesc('number');
gr.query();
gs.log("KO: getRowCount(): " + gr.getRowCount());
if (gr.next()) {
var link = new AssessmentUtils().getAssessmentInstanceURL(gr.getUniqueValue());
gs.log("KO: link: " + link);
template.print('<p><font size="5" color="#FFFFFF" face="helvetica">');
template.print(gs.getMessage('We value your input. Please help us by taking the time to fill out this short survey:'));
template.print('</font></p>');
template.print('<p><font face="helvetica">');
template.print('<a style="font-size: 16px; font-family: Helvetica, Courier New, monospace; color: #ffffff; text-decoration: none; border-radius: 3px; -webkit-border-radius: 3px; -moz-border-radius: 3px; background-color: #278efc; border: 1px solid #0368d4; display: inline-block; padding: 5px" href="' + link + '">' + gs.getMessage('Click here to take the survey') + '</a>');
template.print('</font></p>');
}
})(current, template, email, email_action, event);
Reference:
Once the survey notification is created please do post checks for permissions under accessible records and allow.
Reference: