Did ${URI_REF} helps to open a record in SOW

lalithkumar
Tera Contributor

hi everyone ,

i created a notification that contains ${URI_REF} its open the record in itil but i want to open the record in sow

can anyone help me how to configure it 

can we do by using ${URI_REF}

record is opening here 

lalithkumar_0-1743155249424.png 

but i want topen record here directly after clicking link 

lalithkumar_1-1743155342874.png

can anyone help me with this 

 

 

2 ACCEPTED SOLUTIONS

Medi C
Giga Sage

Hello @lalithkumar,

 

This can't be done using URI_REF.

Please Create an Email Script from: 

MediC_0-1743156183358.png

(I am naming it "open_ticket_on_sow")

 

(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
    /* Optional EmailOutbound */
    email, /* Optional GlideRecord */ email_action,
    /* Optional GlideRecord */
    event) {

    var agentURL = '<a href="' + gs.getProperty('glide.servlet.uri') + '/now/sow/record/' + current.getTableName() + '/' + current.sys_id + '">' + current.number + '</a>';
    template.print(agentURL + "<br />");

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

 

Back on your notification, replace ${URI_REF} with:

${mail_script:open_ticket_on_sow}

 


If you found this helpful, please hit the thumbs-up button and mark as correct. That helps others find their solutions.

View solution in original post

Ankur Bawiskar
Tera Patron
Tera Patron

@lalithkumar 

not possible directly.

you can use the link capability and open that record in workspace, give relative URL

AnkurBawiskar_0-1743156898033.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

3 REPLIES 3

Medi C
Giga Sage

Hello @lalithkumar,

 

This can't be done using URI_REF.

Please Create an Email Script from: 

MediC_0-1743156183358.png

(I am naming it "open_ticket_on_sow")

 

(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
    /* Optional EmailOutbound */
    email, /* Optional GlideRecord */ email_action,
    /* Optional GlideRecord */
    event) {

    var agentURL = '<a href="' + gs.getProperty('glide.servlet.uri') + '/now/sow/record/' + current.getTableName() + '/' + current.sys_id + '">' + current.number + '</a>';
    template.print(agentURL + "<br />");

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

 

Back on your notification, replace ${URI_REF} with:

${mail_script:open_ticket_on_sow}

 


If you found this helpful, please hit the thumbs-up button and mark as correct. That helps others find their solutions.

Ankur Bawiskar
Tera Patron
Tera Patron

@lalithkumar 

not possible directly.

you can use the link capability and open that record in workspace, give relative URL

AnkurBawiskar_0-1743156898033.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Thank you it helped