How to Create A Hyperlink in Scripted REST API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2018 01:36 AM
Hi There,
I was trying to send a Link from Scripted REST API to Ok Google app but instead of sending as a link its sending in text
Can someone help me in this,
REgards
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2018 02:38 AM
Hi Sandeep,
Following is an example for incident table
var rBody = {};
rBody.url = 'http://' + gs.getProperty('instance_name') + '.service-now.com/incident.do?sys_id=' + sysId;
response.setBody(rBody);
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2018 04:12 AM
Hi Ankur
I thing i confused you
See the below code:
if(g_parking.next())
{
var message1=" Click on link to goto that Location ";
var Url = "http://www.google.com/maps/place/"+g_parking.u_lattitude+","+g_parking.u_lognitude;
message = message1 + knowledgeUrl ;
}
else message= "There is No Parking available";
}
Now here you see URL that i want to send Out of ServiceNow in Clickable form.
I need to send message as a whole.
Expected Result:
Click on link to go to that Location HYPERLINK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2018 05:05 AM
Hi Sandeep,
Where are you displaying that message?
Click on link to go to that Location HYPERLINK
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2018 05:11 AM
I want to send sending message and the link in clickable format.
Example :
<Text :Click on link to go to that Location> <Clickable link: HYPERLINK>
Thanks
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2018 05:25 AM
Hi Sandeep,
Where have you written this code?
Also can you explain the scenario for this.
Till now I am assuming the script to be in scripted rest api and the link/url should be sent over as API response.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
