Survey URL from email Notification redirecting to Service Portal

pramodkumar
Tera Expert

Hello All,

We are working on surveys, redirected a survey email link to service portal. We are not displaying survey widgets on the portal. The requirement is, when the user clicks on the survey email link it should redirect him to the respective survey meaning it may be be incident or request survey.

 

How can we get the dynamic link in the email scripts?

 

 

Thanks!

 

1 ACCEPTED SOLUTION

Use something like below:

var link = gs.getProperty('glide.servlet.uri') + 'sp?id=take_survey&instance_id=' +  current.sys_id;

Please mark my response as correct and helpful if it helped solved your question.
-Thanks

View solution in original post

8 REPLIES 8

Use something like below:

var link = gs.getProperty('glide.servlet.uri') + 'sp?id=take_survey&instance_id=' +  current.sys_id;

Please mark my response as correct and helpful if it helped solved your question.
-Thanks

Thanks Prateek. We were able to resolve the issue with link.

Could you please let me know where to use this ?

Open the survey  form   and click on "View Survey Url" in the related links . Thats should display the URL which open the survey in service portal . Also you can refer to "Survey user invite" OOB email notification . 

<mail_script>
var html = new AssessmentUtils().getInstanceLinkHTML(current);
template.print(html);
</mail_script>