After upgrading to Madrid, Survey Links in email are broken. 

Basically the Survey links in the email is generated with no url. Instead you see 'undefined' where the url should be. 


Steps to reproduce: 

Resolve the incident

Check email for Survey 

Survey link will show ‘undefined’






Upon investigating we identified there were customizations made on AssessmentUtils  Script include which skipped the file during the upgrade.


- The notification used for the surveys is Survey User Invite 

- In the Message of this Notification the mail script has the code below: 

 Click here to take your survey: 



var html = new AssessmentUtils().getInstanceLinkHTML(current); 




- This is referencing OOB Script Include and the method 'getInstanceLinkHTML(current);' 

 - After reviewing the script include ‘AssessmentUtils ‘ we determined it has been heavily customized 

- On the current custom version of this file a huge chunk of code missing.

 From line 1119 beginning of the relevant code ( getInstanceLinkHTML : function(instanceGr) {) 

 To line 1391 is missing from the custom version of the script but exists in the OOB code. 


Revert to the OOB version of this file ‘AssessmentUtils ‘. After reverting Script Include ‘AssessmentUtils’ to the original version, the survey url issue is fixed.


1. To do this navigate to the Script Include record below 



Review the 'Versions' related list on the Form. 

From the versions list, right click on the record 'System Upgrades: glide-madrid-12-18-2018__patch1-hotfix2-03-14-2019_03-20-2019_1304.zip' 

From the pop up which is opened, select 'revert to this version'. 


2. Alternatively, navigate to Module > Upgrade History, find the relevant skipped log record below 

Open this record, and at the bottom of the open page click the 'Resolve Conflicts' button. 

In the page that opens, scroll to the bottom of the page click the 'Revert to base system' button. 

Additional Information

Please note as per recommended after an upgrade, best practice suggests you review your skipped objects. These records should be reviewed, and you should revert any of the supplied scripts to an Out Of Box state, and then reapply any customizations on top. 

This ensures that any changes made in the underlying code, are current and up to date, will work as expected on that version of the ServiceNow platform

Article Information

Last Updated:2019-08-02 20:45:03