Add hyper links to worknotes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2023 09:56 PM - edited 01-27-2023 01:24 AM
I need to add hyper links in work notes from flow designer . Tried below code . It prints the following message, but not as hyperlink.
URL works fine when I test this by pasting it in browser
var URL1 = "https://"+gs.getProperty('instance_name')+".service-now.com/$flow-designer.do?sysparm_nostack=true&sysparm_use_polaris=false#/operations/context/"+inputs.executionflowcontext;
var finalURL = '<a href='+URL1 +'</a>';
var finalURL2 = '[code]' + finalURL + '[/code]';
outputs.finalurl3 = finalURL;
outputs.finalurl4 = finalURL2;
//Tried setting both finalurl3 and finalurl4 to worknotes in seperate tests. They added the followign message.
//Output on worknotes
finalurl3 :
<a href=https://XXXXXXX.service-now.com/$flow-designer.do?sysparm_nostack=true&sysparm_use_polaris=false#/operations/context/21900ef25fe82990fe67a6dfefeef4ae</a>
finalurl4 :
<a href=https://XXXXXXX.service-now.com/$flow-designer.do?sysparm_nostack=true&sysparm_use_polaris=false#/operations/context/21900ef25fe82990fe67a6dfefeef4ae</a>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2023 10:28 PM
Hi @pardhiv ,
Almost your code is correct. only few changes needs to be done on the finalURL Variable.
Change the finalURL variable to the below code.
var finalURL = '<a href='+URL1 +'>flow execution</a>';
and try to add the FinalURL2 to the worknotes. i think this would help in resolving the issue.
Mark helpful if it helps in solving your query.
Regards,
Johns
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2023 01:08 AM - edited 01-27-2023 01:11 AM
Modified the Code . But it still doesnt show as hyperlink . Fyi , The output in flow designer is a URL Variable. Does that have any Impact
(function execute(inputs, outputs) {
var URL1 = "https://"+gs.getProperty('instance_name')+".service-now.com/$flow-designer.do?sysparm_nostack=true&sysparm_use_polaris=false#/operations/context/"+inputs.executionflowcontext;
var finalURL = '<a href='+URL1 +'>flow execution</a>';
var finalURL2 = '[code]' + finalURL + '[/code]';
outputs.finalurl3 = finalURL;
outputs.finalurl4 = finalURL2;
//This is the how it looks in work Notes when I add finalurl4 , Does it have any impact if the update record step is before outputs step
<a href=https://XXXXX.service-now.com/$flow-designer.do?sysparm_nostack=true&sysparm_use_polaris=false#/operations/context/00ab4b0fbd286910df2c53aeed801db3>flow execution</a>
})(inputs, outputs);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2023 01:43 AM
Hi @pardhiv ,
Can you convert the output into string type and see if it fixes the issue?
Regards,
Johns
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2023 02:18 AM
No luck