How does URI and URI_Ref works in ServiceNow

pramodkumar
Tera Expert

How does URI and URI_REF work. Currently our emails redirect end users(with no roles) to cms portal and ITIL users to regular ITSM view. Where does this configuration happens? I can see few email scripts, but  are there any properties or scripts that I can look to understand how this URI and URI_REF works. Our goal is to redirect end users to new service portal. Any suggestions?

 

 

Thanks!

3 REPLIES 3

Tony Chatfield1
Kilo Patron

Hi,

You can configure your own clickable url link in a mail script.


//in the email
${mail_script:myScripted.portal.url}

// the script name = myScripted.portal.url

(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
          /* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
          /* Optional GlideRecord */ event) {
    
var instanceURL = gs.getProperty('glide.servlet.uri');
var myTable = current.sys_class_name;
var myPortal = '/myPortal/';
    
var myURL = '<a href=' + instanceURL + myPortal + '?id=form&table=' + myTable + '&sys_id=' + current.sys_id + '>' + current.number + '</a>';

template.print(myURL);

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

MsM
Tera Contributor

Hi,

@pramodkumar have you got your answer, I am looking for the same requirement.

If any one knows about this, please share.

 

Regards,

MSM

santu889
Tera Contributor

Hi, I have the similar requirement. Let me know if you got the answer.