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

You can also use lookup action to get record sys_id.

There are various ways to get current record sys_id in flow.

 

find_real_file.png

 

Regards,

Sachin

Hello,

Thanks for your help, but I got a solution by using flow api in inline script like this:

find_real_file.png

 

Hey Aditya, 

Thank You so much for sharing this info. I was looking out for this and find it very helpful.

smcdonald
Tera Contributor

I use the following script to set a flow variable:

var contextId = FlowScriptAPI.getContextID();
return contextId;