i am not getting the RITM link

chandan2212
Tera Contributor

HI All, 

 

We are using Saviynt integration in that in i need to send RITM link .We are using the workflow to send the payload to Saviynt teams . Once the user click RITM than it should open the service now page .I have used the 

var url = '<a href="' + gs.getProperty('glide.servlet.uri') + '/nav_to.do?uri=' + 'sc_req_item' + '.do?sys_id=' + current.sys_id + '">' + current.number + '</a>';

 

while writing the script in the workflow:

 

var url = '<a href="'  + 'https://p32uat.service-now.com/nav_to.do?uri=' + 'sc_req_item' + '.do?sys_id=' + current.sys_id + '">' + current.number + '</a>';
 workflow.scratchpad.vumber=url;
 gs.log('test_123'+ workflow.scratchpad.vumber);

 

 

I am Getting output in the logs : like :

test_123<a href="https://s32uat.service-now.com/nav_to.do?uri=sc_req_item.do?sys_id=37c2541a87466e1013a7cae20cbb35e2">RITM0041256</a>

 

Can you help me to get the correct output

Thanks,

Chandan

1 ACCEPTED SOLUTION

@chandan2212 

that's not possible while sending REST Message as it will be sent as plain text.

Inform 3rd party to handle this at their side, you can send RITM number and the link separately and then they can handle the anchor tag at their side to add link in their notes/some field.

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

13 REPLIES 13

@Ankur Bawiskar : I am not sending in the email , i need to send payload to the Saviynt instance, but it ia not coming .

@chandan2212 

how are you sending it? using rest message? share that script

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

@Ankur Bawiskar : i am using run script

1:  runscript

var url = '<a href="'  + 'https://p32uat.service-now.com/nav_to.do?uri=' + 'sc_req_item' + '.do?sys_id=' + current.sys_id + '">' + current.number + '</a>';
 workflow.scratchpad.vumber=url;
 gs.log('test_123'+ workflow.scratchpad.vumber);

2 runscript:

 

 

function createContractor(firstname, lastname, title, phonenumber, secondaryEmail, preferedFirstName, displayname, companyname, response) {
    var body = {
        "firstname": firstname,
        "lastname": lastname,
        "employeeType": "External Contractor",
        "employeeclass": "External Contractor",
        "title": title,
        "startdate": workflow.scratchpad.start_date,
        "enddate": workflow.scratchpad.end_date,
        "departmentname": current.variables.department.getDisplayValue(),
        "location": current.variables.office_location.toString(),
        "locationdesc": current.variables.personnel_area.toString(),
        "customproperty5": current.variables.office_operation.toString(),
        "phonenumber": phonenumber,
        "secondaryEmail": secondaryEmail,
        "manager": workflow.scratchpad.manager_account_name,
        "preferedFirstName": preferedFirstName,
        "displayname": displayname,
        "customproperty9": current.variables.mailbox_required.toString(),
        "customproperty65": current.variables.vpn_required.toString(),
        "statuskey": workflow.scratchpad.statuskey.toString(),
        "companyname": companyname,
        "customer64":workflow.scratchpad.vumber

    };

@chandan2212 

it will go as string only, how are the 3rd party receiving them?

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

@Ankur Bawiskar  : they are receiving correct output, currently they are receiving the only RITM number but now they want RITM with link, once they will click the link it should open the ServiceNow page.

 

I am getting the RITM number using workflow.scratchpad but i am not getting link.