You need to sign in to do that
Don't have an account?
Aneesha S
Call auto launched flow from apex trigger
Hello,
i am am trying to run an auto launched flow from an apex trigger. I have code to invoke flow in an apex class method which is called from a trigger. However on execution I see that the flow is not launched. I am able to run the flow from process builder just fine. Is there anything that I'm missing?
i am am trying to run an auto launched flow from an apex trigger. I have code to invoke flow in an apex class method which is called from a trigger. However on execution I see that the flow is not launched. I am able to run the flow from process builder just fine. Is there anything that I'm missing?
To invoke a flow from a class and pass in values to the Flow's variables: Your flow variables to be declared of type input/output as appropriate. Reference to variables is case-sensitive
Doc refs: Getting variables from flows and Setting variables into Flow.
- https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_forcecom_visualworkflow_vars.htm?search_text=flow
- https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/flow_interview_class.htm#flow_interview_class
Hope this helps.Please mark this as solved if my reply was helpful.
Thanks,
Nagendra.
Thanks for your response.
I am doing this. However unable to trigger it from apex handler for a trigger. Is there any limitation like that?