How can we get the sys_id of current flow context inside the flow?

Aditya Sharma 7
Tera Contributor

Hello,

I'm trying to use the Error handler functionality of Flow Designer to create an incident every time my flows fails, so I want to provide the link to the failed flow context for that I need sys_id of my flow context inside the flow. 

Is there a way to get it?

8 REPLIES 8

sachin_namjoshi
Kilo Patron
Kilo Patron

You can query table, sys_flow_plan_context_binding. It has a Hash Code field, which has the trigger record sys_id and Sys Flow Context field, which has the id of the sys_flow_context record.

 

Regards,

Sachin

How can I access hash code inside my flow?

I need that inside flow to create query it

You can query sys_flow_plan_context_binding table with current sys_id and match with has code in your flow inline script.

current.sys_id will give sys_id of trigger record in your inline script, custom action of your flow.

After this, you will get current flow context from sys_flow_context field from sys_flow_plan_context_binding table.

 

Regards,

Sachin

 

 

Aditya Sharma 7
Tera Contributor

current.sys_id doesn't work inside flow inline script.