How to get current sys_id in ACTION (in flow designer)?

Vivek Tirpude
Giga Contributor

Hi,

How to get the current.sys_id of the current record where FLOW (with Action) is running?
find_real_file.png

 

1 ACCEPTED SOLUTION

Hi,

I'm not suggesting you to hard code the sys_id. Hope you have a custom Action created and is called from a flow. The current record of flow is not accessible to action. You need to pass this as input parameter to the action.  

In Action, create a Action Input with name as sys_id and Type as string. You need to pass the sys_id of the record from the flow so that it is dynamic to the flow (drag and drop sys_id field of the trigger record as input to the action).

In the script step, add a Input variable, set some valid name (sys_id). In value field of this param you can drag and drop the sys_id from Input Variables

Now you can refer this sy_id as input.sys_id or input['sys_id'] in the script. This holds the dynamic value passed from the flow.

  

Thank you,
Palani

View solution in original post

7 REPLIES 7

palanikumar
Mega Sage

Hi,

You should pass sys_id as input to this action. And then you can add this sys_id as a input parameter to this script step  

Thank you,
Palani

We're not aiming for hard-coded sys_id. It should be dynamic based on the record where flow is executed.

Hi,

I'm not suggesting you to hard code the sys_id. Hope you have a custom Action created and is called from a flow. The current record of flow is not accessible to action. You need to pass this as input parameter to the action.  

In Action, create a Action Input with name as sys_id and Type as string. You need to pass the sys_id of the record from the flow so that it is dynamic to the flow (drag and drop sys_id field of the trigger record as input to the action).

In the script step, add a Input variable, set some valid name (sys_id). In value field of this param you can drag and drop the sys_id from Input Variables

Now you can refer this sy_id as input.sys_id or input['sys_id'] in the script. This holds the dynamic value passed from the flow.

  

Thank you,
Palani

Understood, thanks Palani
let me try this too. I'll respond if it works successfully.