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
Brian GlassBrian Glass 

How launch workflow from button in middle of page layout?

Please pardon my ignorance.  I am VERY new to coding in VF, APEX and Salesforce in general.  Most of what I have learned so far has been from hacking...

I am trying to add a button in the middle of a page layout that will kick off a visual workflow.  About the only way I have found to place this button specifically where I want it is to insert a simple VF page with a button on it.  Based on the status field of the particular record, I want that button to fire a different workflow (user only clicks one button, but system is smart enough to send them to the proper workflow based on where in the process the record is).

When the user finishes the workflow, I would like the original page to refresh.

Is this possible or am I asking too much of VF (and possibly APEX)?
I would love to use a regular button, but I dynamically want to change the button label based on where in the process the record is.


varun_vatsavarun_vatsa
IT surely can be done... VF and Apex are robust and flexible enough to handle such things.