Trigger flow on update of the sc_req_item.

Bharath K B3
Tera Contributor

I need to trigger the flow on the update of the sc_req_item along with the creation of the record. How could this be done? 

5 REPLIES 5

Mark Manders
Mega Patron

Not sure if I understand you correctly, but you can trigger a flow on 'created or updated'.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

@Mark Manders I need to trigger the flow even when the catalog item is updated. The flow is triggered only when the created request item's parent request is approved.

 

 

Its_Azar
Tera Guru

Hi there @Bharath K B3 

 

 First, create the Flow Designer flow that you want to trigger when an sc_req_item record is updated.Configure set a Business Rule. Set the Table to Requested Item [sc_req_item], as this is the table you want to trigger the flow. on.Define the condition under which the flow should be triggered. Since you want to trigger the flow on both creation and update of sc_req_item records, you can set the condition to true.

 

(function executeRule(current, previous /*null when async*/) {

    var flowName = 'Your_Flow_Name'; 
    var flowInput = {}; 

   
    var result = new global.FlowAPI().triggerFlow(flowName, flowInput);
})(current, previous);

 

If this helps kindly accept the response.

☑️ If this helped, please mark it as Helpful or Accept Solution so others can find the answer too.




Kind Regards,

Mohamed Azarudeen Z

Developer @ KPMG

 Microsoft MVP (AI Services), India

Why trigger the flow from a BR when you can trigger it on the flow itself?


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark