Survey links in emails generating as 'undefined'Issue <!-- div.margin{ padding: 10px 40px 40px 30px; } table.tocTable{ border: 1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); padding-top: .6em; padding-bottom: .6em; padding-left: .9em; padding-right: .6em; } table.noteTable{ border:1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); width: 100%; border-spacing:2; } table.internaltable { white-space:nowrap; text-align:left; border-width: 1px; border-collapse: collapse; font-size:14px; width: 85%; } table.internaltable th { border-width: 1px; padding: 5px; border-style: solid; border-color: rgb(245, 245, 245); background-color: rgb(245, 245, 245); } table.internaltable td { border-width: 1px; padding: 5px; border-style: solid; border-color: #E0E0E0; color: #000000; } .title { color: #D1232B; font-weight:normal; font-size:28px; } h1{ color: #D1232B; font-weight:normal; font-size:21px; margin-bottom:-5px } h2{ color: #646464; font-weight:bold; font-size:18px; } h3{ color: #000000; font-weight:BOLD; font-size:16px; text-decoration:underline; } h4{ color: #646464; font-weight:BOLD; font-size:15px; text-decoration:; } h5{ color: #000000; font-weight:BOLD; font-size:13px; text-decoration:; } h6{ color: #000000; font-weight:BOLD; font-size:14px; text-decoration:; } ul{ list-style: disc outside none; margin-left: 0; } li { padding-left: 1em; } --> After upgrading to Madrid, Survey Links in the email are broken. Basically, the Survey links in the email are generated with no URL. Instead, you see 'undefined' where the URL should be. Steps to reproduce: 1. Resolve the incident 2. Check email for Survey 3. Survey link will show ‘undefined’ ReleaseMadridCauseUpon 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: <mail_script> var html = new AssessmentUtils().getInstanceLinkHTML(current); template.print(html); </mail_script> - 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. ResolutionRevert 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 https://xxxxxx.service-now.com/nav_to.do?uri=sys_script_include.do?sys_id=ca4033c1d7110100fceaa6859e610326 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. Related LinksPlease 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, and will work as expected on that version of the ServiceNow platform