- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 10-23-2019 01:16 PM
Following are instructions for a custom action to create a hyperlink in Flow Designer. In this case I'm creating a hyperlink to a table record but I'll follow up with a description of a custom action to create an external hyperlink.
The action inputs:
Label | Type |
tableName | string |
recordSysId | string |
linkDisplayName | string |
The "Generate Link" script:
(function execute(inputs, outputs) {
var linkJournal="[code] " + "<a href=\"" + inputs['tableName'] + ".do?sys_id=" + inputs['recordSysId'] + "\" target=\"_blank\">" + inputs['linkDisplayName'] + "</a>" + " [/code]";
outputs['linkJournal']=linkJournal
var linkHTML="<a href=\"" + inputs['tableName'] + ".do?sys_id=" + inputs['recordSysId'] + "\" target=\"_blank\">" + inputs['linkDisplayName'] + "</a>";
outputs['linkHTML']=linkHTML
})(inputs, outputs);
The action outputs:
Label | Value |
linkHTML | step > Generate Link > linkHTML |
linkJournal | step > Generate Link > linkJournal |
Then when using the action in a flow, drag and drop a lookup record's attributes into the appropriate fields (Incident Table for the first input, Incident Record > Sys ID for the second, then Incident Record > Number for the third input).
The reasoning behind the two outputs is that journal fields require the [code][/code] around the html. (See Formatting within Journal fields using HTML & [code])
For an external hyperlink you only need two inputs, one for the URL and one for the text to display. Then the script is modified to construct the hyperlink appropriately.
I hope you find this helpful.
Daniel
- 5,931 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Very helpful! It almost works for us 🙂 - we seem to pick up some "garbage" from the datapill, ours picks up something, I think its the first "TASK...." anything you've seen before, and how to correct?
<p><p> Your group has been assigned <span class="data_parent_pill" style="display: inline;" contenteditable="false" data-pillid="2e0d80ad-46aa-4bec-8ca9-d89a669945bd" data-pillvalue="<a href="sc_task.do?sys_id=6f63d161db02cc501233341f9d9619ce" target="_blank">TASK0060435</a>"><a href="sc_task.do?sys_id=6f63d161db02cc501233341f9d9619ce" target="_blank">TASK0060435</a></span>- see description below.</p>
<p> <span class="data_parent_pill" style="display: inline;" contenteditable="false" data-pillid="2acbe028-5ae3-4197-824d-2fa0d70e5b04" data-pillvalue="abc 123">abc 123</span></p>
<p> </p></p>

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Did you ever follow up with a description of a custom action to create an external hyperlink?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi
I was wondering if you could help me please. I am struggling a little on the Action Outputs. Could you kindly provide the steps and/or screenshot of what this should look like? I am unable to find the value column
Regards
Daniel
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi @itpro72
I have tried with all steps but i am unable to generate link
Could you please help me on this.
Thanks In Advance.
Regards
Panga Rajamma