- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2022 08:06 PM
Hello there. Short story - I have a request to insert a record link into generated Tasks if the RITM has attachment/s. I am trying to use Flow with this action 'Generate Link to Table Record' and add a work note update to the Task - Is this possible? I have used the above action in my Flow, however it does not create the record number / link, it spits out the code instead ie:
Results:
Expected results - I was hoping for something like this:
This is my Flow:
tableName = 2-Look up Record > Requested Item Table
recordSysID = 2-Look up Record > Requested Item record > SysID
linkDisplayName = 2-Look up Record > Requested Item record > Number
3-Generate Link to Table record > link
Thank you.
Solved! Go to Solution.
- Labels:
-
flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2022 01:57 AM
Hi
use this script and place inside f(x) inline script for work notes field
var sysId = fd_data.trigger.current.sys_id;
var rec = new GlideRecord('sc_task');
rec.get(sysId);
var text = "Note 1: There is an attachment/s in the RITM. Scroll down to RITM Attachments related tab to view the attachment.<br/>";
var url = "Note 2: Click the following to view the RITM record and it's attachments " + '<a href="' + gs.getProperty('glide.servlet.uri') + '/nav_to.do?uri=' + 'sc_req_item' + '.do?sys_id=' + rec.request_item + '">' + rec.request_item.getDisplayValue() + '</a>';
return '[code]' + text + 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
09-07-2022 09:36 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2022 09:44 PM
Hi,
it should work fine since you are using [code] tag
can you simply try this and verify if link comes
return '[code]' + '<a href="https://www.google.com">Visit Google</a>' + '[/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
09-08-2022 06:14 PM
Thank you for your time Ankur. Appreciate it. I replaced the script with your above & results are below:
However, I did some further readings and your initial script does actually work, but the issue is our side where this system property: glide.ui.security.allow_codetag - is set to False. Switching the value to 'True' gave me the link - but will probably need another way as this is set to 'False' for security reasons (I guess):
Regards. Winnie.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2023 04:10 AM
When I use this code in the 'Send Email' action of Flow Designer it gives an error while activating the flow.
Error: attempting to use undefined input = 'current' from DRP request
Note: I do not have the 'Generate Link to Table Record' action available.
How can I add the link to REQ or RITM in this case in the 'Sent Email' action of Flow Designer?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2024 01:42 AM
Hi Sir,
I have used code which you suggested.. I'm doing integration from servicenow to ado..I want a current record clickable link in ado worknotes.. the code is working but in output it is showing code tags.. how to avoid this?