Flow Design action: Generate Link to Table Record

Winnie P
Mega Sage

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:

find_real_file.png

Expected results - I was hoping for something like this:find_real_file.png

This is my Flow:

find_real_file.png

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

find_real_file.png

3-Generate Link to Table record > link

Thank you.

 

1 ACCEPTED SOLUTION

Hi @Winnie Poelima

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'];

find_real_file.png

Regards
Ankur

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

View solution in original post

16 REPLIES 16

MrMuhammad
Giga Sage

Hi @Winnie Poelima

Can you please try wrapping Generate Link to Tab... data pill by [code] tags while mapping it in work notes.

Something like this

[code] 3- Generate Link to Tab.... [code]

Regards,

Muhammad

Regards,
Muhammad

Hey Mohammed, thanks for your reply. Do you mean like this:

find_real_file.png

If so, yes I tried it - but got the same results:

find_real_file.png

Let me know if you have any other ideas.  Thank you for your time.

@Winnie Poelima - Thanks for the update.

If you are using Flow Designer Record Link Generator | Servicenow Share utility then Please try mapping Native UI journal link inside the worknotes. i just tried and it works fine for me.

find_real_file.png

Output

find_real_file.png

For portal link you need to use "Porta Journal Link" data pill.

Regards,

Muhammad

Regards,
Muhammad

Hey thanks Muhammad. Appreciate that. I am not using the Flow Designer Record Link Generator ... but I will give it a go. Regards, Winnie.