Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Question on Survey

Mani60
Tera Contributor

Hi ALL,
I have one survey, when ticket is closed in that notification I have attached survey URL when caller click on that URL it should redirect to take survey but in my case every time sys_id of instance id is different 
To, the sys I'd of the survey sent to the user via email, so here I need both sys IDs should be same, so how can I get only one sys I'd for both.

 

Please find the below survey url i have called in mail script:

 

(function runMailScript(current, template, email, email_action, event) {

    template.print('<p><font size="3" color="#000000" face="Calibri (Body)">');

    

    template.print('</font></p>');

    template.print('<p><font face="Calibri (Body)">');

    

    

    var url = "https://servicedeskuat.service-now.com/sp?id=take_survey&instance_id=${sys_id}";

 

    template.print('<a style="font-size: 16px; font-family: Helvetica, Arial, sans-serif; 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= ' + url + '>Click here to take the survey</a>' );

    template.print('</font></p>');

 

 

})(current, template, email, email_action, event);

 

Please find the below snapshot:

Mani60_0-1699970023405.pngMani60_1-1699970199451.png

Sys_id of asmt_assessment_instance table is different and sys_id of portal is different, Could you please help me on this.

 

 

Thanks,

 

 

 

0 REPLIES 0