Survey email notification error: page not found

CarolMa6
Tera Expert

Hi All, 

 

I need help here, i have an existing survey that comes in a separate email once an incident is resolved. Now i want to add the same survey link to the "resolved" email notification. What am i missing 

 

When i click on the link error: page not found 

CarolMa6_0-1747215068330.png

Email script

CarolMa6_2-1747215254188.pngCarolMa6_3-1747215288337.png

 

Notification: 

CarolMa6_4-1747215399758.png

Updated the url but it defaults to the OOB url 

CarolMa6_5-1747215500234.png

 

Regards 

CarolMa

 

17 REPLIES 17

@Ankur Bawiskar 

 

The assessment table see below. Thats what I opted for resolved email content added to the survey email. That will be sent as resolved email notification with the link to the survey. 

 

see below: 

CarolMa6_0-1754997977880.png

 

"Survey User Invite" notification 

CarolMa6_1-1754998026836.png

Regards 

CarolMa

@CarolMa6 

you didn't share email script which is causing the issue it seems.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
    /* Optional EmailOutbound */
    email, /* Optional GlideRecord */ email_action,
    /* Optional GlideRecord */
    event) {

    var i18nSummary = gs.getMessage('Summary details');

    var incRec = new GlideRecord('incident');
    incRec.get(current.task_id);


    // var i18nResolvedBy = gs.getMessage('Resolved by: {0}', '${resolved_by}');

    var i18nResolvedBy = gs.getMessage('Resolved by: {0}', 'incRec.resolved_by.getDisplayValue()');
    var i18nClosedNotes = gs.getMessage('Resolved notes: {0}', 'incRec.close_notes');

    // var i18nClosedNotes = gs.getMessage('Resolved notes: {0}', '${close_notes}');
    template.print('<p><font size="4" color="#808080" face="helvetica"><strong>' + i18nSummary + '</strong></font></p>');
    template.print('<p><font size="3" color="#808080" face="helvetica">' + i18nResolvedBy + '</font></p>');
    template.print('<p><font size="3" color="#808080" face="helvetica">' + i18nClosedNotes + '</font></p>');
})(current, template, email, email_action, event);