+ Start a Discussion
PV09PV09 

Record locking question

I'd like to lock opportunities based on whether a custom field is set to true or false.  There has got to be a way - without having to create a new page layout... we want this to be active for all page layouts.  Any ideas?  I'm sure someone has done this.  Thanks!!
Best Answer chosen by Admin (Salesforce Developers) 
JakesterJakester

I think this is actually deceptively simple. You basically add 2 validation rules. One that doesn't allow changing the checkbox once it's checked which something like

 

 

ischanged(checkbox__c)

 

 And another that doesn't allow any changes when the box is checked, which is simply

 

 

checkbox__c


 

 

 

 

 

All Answers

SteveMo__cSteveMo__c
Have you tried using a Workflow and Approval process?  That might give you the conditional Lock-Down that you're looking for.
PV09PV09
Thanks for your response - I'm not sure how to do that... it looks like we can create a workflow based on updating a field w/in the API... but, am not sure how to get the opportunity locked.  I know the opportunity can be locked from the approval process - but not from the workflow... any thoughts?  I'm definitely no expert.
JakesterJakester

I think this is actually deceptively simple. You basically add 2 validation rules. One that doesn't allow changing the checkbox once it's checked which something like

 

 

ischanged(checkbox__c)

 

 And another that doesn't allow any changes when the box is checked, which is simply

 

 

checkbox__c


 

 

 

 

 

This was selected as the best answer
Success ObjectsSuccess Objects

Check out this AppExchange solution that works with all version of salesforce.com.  (Overrides - Validation Rules for Buttons)