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
David BudimirDavid Budimir 

Identifying Opportunity Stages in Accounts

I'm trying to find a way to create a validation rule that is restricted by the the stage of the most recent opportunity.

In other words - if an account contains an opportunity that is open I'd like to prevent certain fields form being edited in that account. 

Conversley if an opportunity goes from open to closed won - I'd love to be able to update various account fields like account Type (from "Prospect to Customer").

Eager to hear your help. Thanks!


 
Venkat PolisettiVenkat Polisetti
David,

As you already know, there can be more than one Opportunity attached to an Account. Having said that:
  1. Create a work flow rule on the Opportunity that will update a custom field on the account. Whenever you change stage you update that account custom field with the Opportunity Stage.
    • Use a cross object field update
  2. Use validation rules on the Account object to prevent field updates based on your custom field value
You can use the same method to update Account fields when an Opportunity is closed as well.

Hope this helps,
Thanks,
Venkat