You need to sign in to do that
Don't have an account?

How to stop loading VF page and display a custom message when record status is approved.
Hi All,
I have overriden the standard salesforce.com Edit button.when status of the record is approved and if user clicks on Edit button he should shown a custom message that record is approved and cannot be edited and VF page should not be loaded.
Can anyone please tell me how this could acheived if you can provide a sample code snippet it will be helpful.
Thanks,
Srilakshmi B
If you are using Approval Processes, you simply need to remove the "unlock record" action from the Final Action section. The record will remain locked, and only administrators will be able to edit the record. Otherwise, you would include the if/then logic in your VF page directly. It would look like this: