- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2022 08:06 AM
Hi,
How to get the current.sys_id of the current record where FLOW (with Action) is running?
Solved! Go to Solution.
- Labels:
-
flow designer

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2022 08:26 AM
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.
Palani

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2022 08:12 AM
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
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2022 08:14 AM
We're not aiming for hard-coded sys_id. It should be dynamic based on the record where flow is executed.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2022 08:26 AM
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.
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2022 08:29 AM
Understood, thanks Palani
let me try this too. I'll respond if it works successfully.