Interaction URL in HTMLTemplates

I am on Service Manager version 9.52

We have been using HTMLTempaltes for the Incident Module with no issues and the link to the IM ticket works for users.

We want to start using some emails in the Interaction Module and the OOB html templates do not work for the record URL.  

For Incidents (which works), on the expression tab is this:

var file_name = system.functions.filename($RECORD);
var record_name = system.functions.scmsg(file_name,"tablename");
var record_title = record_name " " $RECORD.number;
var record_query = "number=\"" $RECORD.number "\"";
var web_url = lib.urlCreator.getURLFromQuery(file_name,record_query,record_title);

For Interactions (clicking on the record URL in the email does nothing):The expression tab shows this:

var file_name = system.functions.filename($RECORD);
var record_name = system.functions.scmsg(file_name,"tablename");
var record_title = record_name " " $RECORD.incident_id;
var record_query = "incident.id=\"" $RECORD.incident_id "\"";
//var web_url = lib.urlCreator.getURLFromQuery(file_name,record_query,record_title);
var web_url = lib.urlCreator.getRecordURL(file_name,record_query,record_title,$RECORD.incident_id);
var http_url = lib.urlCreator.getRelativeURL();

I tried uncommenting out the commented line and commenting out the bottom 2 lines to make it match the Incident tab and that breaks the email - nothing shows on PReview tab. For both interactions and incidents, on the HTML Source tab, both the incident.id {$RECORD.incident_id} and the number {$RECORD.number} values are link the same way: - see attachment

Any ideas?

 

 

 

  • Hi fcbcd,

    the last line (var http_url) is needed by the logo (if you use the standard layout).

    The Functions getURLFromQuery and getRecordURL do almost the same.

    Maybe you should check the link result and post the content of the href Attribute of the link to the ticket  in the HTML mail. That would help...

    Bo