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
angjayyangjayy 

Question re: Overiding Save Button Based on a Workflow Rule

I need help with the following:

 

I want to make changes and/or edit fields on a page for one of my custom objects.  When I "save" these changes I want to set-up a workflow rule to perform a field update for one of the fields on my custom object.

 

If the workflow rule updates this custom field to an "approved" status, I want to be redirected to a new cutome page on save that shows specific fields.

 

If the workflow rule updates this custom field to a "not approved" status, I want to be redirected to another custom page on save that shows specific fields.

 

So, I would have 3 different page layout for this object.  I would use the "standard" page layout when editing a record.  Then, I would be re-directed to one of my custom page layouts on "save" based on the field update via my workflow rule.

 

Is this possible?  If so, I know how to create my workflow rule and my two custom visual force pages.  However, what mechanism would I use to overide the "save" function, and how can I base this overide on the field update via my workflow rule?

 

Any guidance is appreciated!  

 

Thanks!