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

Using Page Layout to "Lock" Opportunity - best solution?

Our business had a need to prevent closed-won opportunities from being edited or deleted by anyone, so I used a page layout with the edit and delete buttons removed, a "locked" record type and a workflow rule to change the record type whenever an opportunity was marked closed-won.  This is working fine for us, however I just learned that if anyone searches for the opportunity, they do see an edit button in the list view.  I currently have made all the fields read only so that they cannot be changed, but what would have been the better way to handle this requirement?


Thanks, I appreciate any advice.



I did the same to make the record read only. However, with inline editing enabled, I'm able to edit the fields by double clicking on them even on the page layout where the fields are set 'ReadOnly'.


Did you find some better solution?

Sourav PSourav P
Hi , Is that possible to deactivate the inline editing for a specific layout ? any idea
Heiner Ulrich ucHeiner Ulrich uc
I think a validation rule would be a better solution for this problem. Something like this will prevent the opp amount field beeing edited in the closed won stage:

ISCHANGED(Amount) && $User.ProfileId <> '00e09000001g8Mn' && IsWon && IsClosed

The user profile ID here is the one of the System Admin.