function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ali AxtAli Axt 

Publisher action with VF page fires on load, not after click

I built a flow (autolaunched), which updates a few fields in an object and sends an email. I want to start this flow via an action. I built a vf page to start the flow. Triggered via a button, everything works fine. But when i trigger it via an action, the vf page fires everytime the page is loaded. How can i change that behaviour?
ShashankShashank (Salesforce Developers) 
You can probably use a static variable flag to run it only once, like we do it for apex triggers: http://developer.force.com/cookbook/recipe/controlling-recursive-triggers