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
ChuckchoChuckcho 

How to lock a record as read only after a field has been updated

The requirement is to lock a opportunity record for editing after the Stage field is changed to "closed/won". Can someone advice how to achieve this.

 

Thanks

AJHAJH

Create an Opportunity record type that has all fields locked (read only).

Then make a workflow that fires when an opportunity stage is "Closed/Won" or whatever your equilivant is.  In the workflow, update the Record Type field of the Opportunity to the record type you just created.

ChuckchoChuckcho

Thanks AJH. The workflow is working great but the only issue is I'm unable to make Sales Stage, Opportunity Name and Close Date read only in the page layout. Is there a way to make them read only too.

 

Thank You !

AJHAJH

Yes I see now that those fields cannot be set as "read only."

 

I've not tried this, but perhaps you can setup an approval process to (in place of changing the stage field to "closed/won")

 

1 - have the reps submit the oppty for approval

2 - set it auto approve

3 - then set the record to "locked" (e.g. don't unlock it through the approval process)

 

Good luck!