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
BigSmokeBigSmoke 

Locking changes (especially to product line items) on Opps after close

Hi,

 

Does anyone have any interesting thoughts on the old conundrum of making sure that Opportunities don't get edited after close?  Even if they do get edited for certain reasons, most businesses would not want opportunity products deleted after opportunities are closed.

 

I've always changed the record type on closed opps and assigned a read-only page layout.  This still allows for line items to be deleted.    This doesn't work so well anymore as I've got too many record types that would need corresponding "Closed" record types.

 

I've been considering:

 

1. Using Approvals to lock the record

2. Using a trigger to throw an error

 

Are there any other interesting ways you all go about this?  Maybe some validation rule I wasn't thinking of??

 

I've read other posts on this topic, but they're many years old.

WYamWYam

Validation rule might work... try something like

 

 

AND(ispickval(stagename,"Won"),ischanged(lastmodifieddate))

 

 

 

If you want to add an exception so you don't prevent system admins from making changes, you can add to the effect of:

 

 

AND(ispickval(stagename,"Won"),ischanged(lastmodifieddate),$profileID<>"1234567890ABC")

 

That should work... I hope. Sandbox would be a good place to test =) Hope that helps.