Assessment Notification Script

snowuser111
Kilo Guru

Hi,

I have notification for Assessment metrics (Survey) which triggers and survey is received in email. But I do not want to display the URL instead want to show Click here. On clicking "CLICK HERE" it should redirect the survey link.

______________________________________________________________________________

You have been invited to take the survey: ${metric_type}.  

Click here to take your survey:

<mail_script>

var link = new AssessmentUtils().getAssessmentInstanceURL(current.sys_id);

var url =   '<a href="' + link + '">' + link + '</a>';

template.print(url);

</mail_script>

To view your survey queue at any time, sign in and navigate to Self-Service > My Assessments & Surveys.

______________________________________________________________________________________________________________

Thanks

1 ACCEPTED SOLUTION

Kalaiarasan Pus
Giga Sage

Change this to include 'click here'



var url =   '<a href="' + link + '">' + 'Click Here' + '</a>';


View solution in original post

6 REPLIES 6

Kalaiarasan Pus
Giga Sage

Change this to include 'click here'



var url =   '<a href="' + link + '">' + 'Click Here' + '</a>';


Hi kalaiarasan,



many many thanks for the answer. Just one more help In the same notification i am not getting the "requested for" field niether "Opened for". Actually I want to sent this mail to the Requestor who has opened the Service request(sc_request).


But since this is table:   Assessment Instance [asmt_assessment_instance]


I am not getting that fields.



Thanks


Can anyone help on this please I am not able to select :


Requested For:


Request Number:



Please suggest


mev1
Giga Contributor

Try this:


1. Go into the survey's trigger conditions and set the Related Fields to those options


2. Go to the survey notification (Under the "Who Will receive" tab) and set the value in the "Users/groups in fields" area


Example could be: "Trigger condition.Related Field 1"



I haven't had a chance to try this yet, let me know if it works!



Thank you,


Patrick