How to use the flow designer into multiple flows

shaik_irfan
Tera Guru

Hi,

I have created a Flow designer which validates and map to my parent record.

Now i want to use the same flow designer for mulitple tables like

 

When ever a record is created in Table1 then i validates and map it to Parent table. This is working

Now i have Table 2, Table 3, Table 4 which i want to map to same Parent table. Is it possible we can use the same flow, just like how we use Script include and call from multiple tables ?

 

 

1 ACCEPTED SOLUTION

Willem
Giga Sage
Giga Sage

Or you can trigger the Flows using:

// Map inputs. For a flow with a record trigger, inputs are the record and table
	var inputs = {};
	inputs['current'] = current; // GlideRecord of table:  
	inputs['table_name'] = 'incident';

   // Execute the global flow called test_flow 
   sn_fd.FlowAPI.executeFlow('global.test_flow', inputs);

https://developer.servicenow.com/dev.do#!/learn/learning-plans/madrid/servicenow_application_develop...

 

find_real_file.png

https://developer.servicenow.com/dev.do#!/reference/api/orlando/server/sn_fd-namespace/ScriptableFlo...

View solution in original post

4 REPLIES 4

Willem
Giga Sage
Giga Sage

Not exactly. You can have a Flow for each table with the Trigger set for that. Then the Main flow can be a sub-flow for all the other Flows.

Willem
Giga Sage
Giga Sage

Or you can trigger the Flows using:

// Map inputs. For a flow with a record trigger, inputs are the record and table
	var inputs = {};
	inputs['current'] = current; // GlideRecord of table:  
	inputs['table_name'] = 'incident';

   // Execute the global flow called test_flow 
   sn_fd.FlowAPI.executeFlow('global.test_flow', inputs);

https://developer.servicenow.com/dev.do#!/learn/learning-plans/madrid/servicenow_application_develop...

 

find_real_file.png

https://developer.servicenow.com/dev.do#!/reference/api/orlando/server/sn_fd-namespace/ScriptableFlo...

+1 to Willem.

Use code snippet to use anywhere but you have to play with code.

 

Thanks

Sudhanshu

Sudhanshu Talw1
Tera Guru

If you want to create something reusable go for subflow simply rather then taking this approach.

Call subflows anywhere even in workflows as well.

Thanks

Sudhanshu