Get sys_id of current record in for each loop and pass in to email hyperlink via flow designer

Mike D1
Giga Guru

Hi

I have a requirement to change an existing flow that looks up approval records in a for each loop and sends a notification for each record. 

Currently there is a hyperlink in the notification that just directs to the portal, but the change I need to do is to get the sys id for each record and pass it in to the hyperlink for each notification so that it links directly to the approval record.

I tried using the link generator but for some reason the sys_id is greyed out? 

Is there another way to add this in the hyperlink? I also tried the following in the url but that did not work...

sp?id=approval&table=sysapproval_approver&sys_id=fd_data._2__for_each.item.sys_id

 

Thanks

Mike

1 ACCEPTED SOLUTION

OlaN
Giga Sage
Giga Sage

Hi,

You can try to first store the sysID in a Flow variable and then pass the flow variable as input to the link generator.

Or you can try setting the link directly by just changing your last line to something like:

var url = somePrefixWithInstanceName + "sp?id=approval&table=sysapproval_approver&sys_id=" + fd_data._2__for_each.item.sys_id.toString();

View solution in original post

1 REPLY 1

OlaN
Giga Sage
Giga Sage

Hi,

You can try to first store the sysID in a Flow variable and then pass the flow variable as input to the link generator.

Or you can try setting the link directly by just changing your last line to something like:

var url = somePrefixWithInstanceName + "sp?id=approval&table=sysapproval_approver&sys_id=" + fd_data._2__for_each.item.sys_id.toString();