- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2021 10:07 PM
Hello,
Can someone please provide suggestion on how we can use Flow Designer to add a hyperlink in RITM Work Notes to a change recorder?
Thank you
Solved! Go to Solution.
- Labels:
-
Team Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2021 10:40 PM
Hi,
just try this
var sysId = fd_data._7__for_each.item.sys_id;
var tableName = 'change_request';
var number = fd_data._7__for_each.item.number;
var url = '<a href="' + '/' + tableName + '.do?sys_id=' + sysId + '">' + number + '</a>';
return '[code]' + url + '[/code]';
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-30-2021 08:25 AM
Ankur,
I copied the link and pasted in the browser. It took me to the wrong change request number:
Here is the code:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2021 10:55 PM
Hi,
it means the link is working fine
but the record you are referring is incorrect
your URL will take as per record sys_id; so query the CHG table with that sys_id and get the CHG number and then include that
Let me know if I have answered your question.
If so, please mark appropriate response as correct & helpful so that this thread can be closed and others can be benefited by 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
08-02-2021 01:57 PM
Hello Ankur,
I think you are very close to get this works for us.
This is the code:
It is still no sync with the change recorder. It is still taking me to this blank page:
It works if I right click on the change number and "Open link in new window"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2021 10:11 PM
did you check what URL is formed? by printing the url variable in the script section?
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
08-02-2021 10:30 PM
I right clicked on the link and open link in new window and this works find:
https://xxxxx.service-now.com/nav_to.do?uri=%2Fchange_request.do%3Fsys_id%3D3019b2a02fb53010e31b51072799b609
However, when I single clicked on the link, it opened this URL to a blank page.
https://dev65048.service-now.com/nav_to.do?uri=%2Fhome.do%3F
Here is the current code:
var sysId = fd_data._7__for_each.item.sys_id;
var tableName = 'change_request';
var number = fd_data._7__for_each.item.number;
var url = '<a href="' + gs.getProperty('glide.servlet.uri') + '/nav_to.do?uri=' + tableName + '.do?sys_id=' + sysId + '">' + number + '</a>';
return '[code]' + url + '[/code]';
Please help...
Thank you so much!