- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2021 04:45 AM
I have a requirement where I have to mention the incident number in worknotes/Additional comments section in form of Hyperlink.
I can do it via [code]<a href="https://www.servicenow.com">ServiceNow.com</a>[/code], but the question is how can I get the URL of the incident.
There are no data pills available to fetch URL of incident to re-direct on click.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2021 06:38 AM
Hi,
so what is pending?
you can get current record sys_id inside the f(x) script like this
var sysId = fd_data.trigger.current.sys_id;
That would help you form the URL to the record
like this; it would add link to current record on which flow is running
var tableName = fd_data.trigger.current.sys_class_name;
var sysId = fd_data.trigger.current.sys_id;
var url = '[code]<a href="' + gs.getProperty('glide.servlet.uri') + '/nav_to.do?uri=' + tableName + '.do?sys_id=' + sysId + '">' + 'My Record' + '</a>[/code]';
return url;
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
10-07-2021 04:55 AM
Hi
please see https://community.servicenow.com/community?id=community_article&sys_id=463c05ef1b665010d2ccea89bd4bc... or https://community.servicenow.com/community?id=community_question&sys_id=e0c805e7dbfbd34067a72926ca96... for a solution.
Kind regards
Maik
If my answer replied your question please mark appropriate response as correct so that the question will appear as resolved for other users who may have a similar question in the future.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2021 05:06 AM
Hi,
where are you using this script?
Can you share some more details around this?
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
10-07-2021 06:12 AM
If you paste [code]<a href="https://www.servicenow.com">ServiceNow.com</a>[/code] in work notes section if will create a hyperlink.
I am trying to incorporate the same using update record action in flow designer to update the work notes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2021 06:38 AM
Hi,
so what is pending?
you can get current record sys_id inside the f(x) script like this
var sysId = fd_data.trigger.current.sys_id;
That would help you form the URL to the record
like this; it would add link to current record on which flow is running
var tableName = fd_data.trigger.current.sys_class_name;
var sysId = fd_data.trigger.current.sys_id;
var url = '[code]<a href="' + gs.getProperty('glide.servlet.uri') + '/nav_to.do?uri=' + tableName + '.do?sys_id=' + sysId + '">' + 'My Record' + '</a>[/code]';
return url;
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader