In Account object, i have a picklist field " Account status" with values as active, blacklisted.

by default, while creation its active, I want that if the value is changed to blacklisted, It shouldn't allow to create a new opportunity in the related list, and give a message that " account is blacklisted". Also, on the existing opportunity, when one entered, it shouldnt allow to edit the opp, and give teh same above message.

Can anyone plz suggest a good way to do this. I tried to use the process builder ( auto approval process), and approval process, while the value is changing , its locking the existing opp. But the drawback on my process is that,

  1. Its keep allowing to create a new opp, and then unlocking it, which i dont want. from beginning it shouldn't allow and give the error message.

  2. for the existing opp, its allowing to edit first time before unlocking it.

  3. No error message i able to set anywhere.

  • 1
    Thanks Tushar for the edit, I have put in the above format actually but dont know after saving it went back the earlier format with everything in a line. – sourav Dec 1 '16 at 11:13

You can use validation rule to prevent new Opportunity and Edit as well. So create a Validation rule on Opportunity

 Account.Type == 'blacklisted'

So if Account Type is blacklisted then it will give you error and do not alow you to create or Edit.

| improve this answer | |
  • Thannks Tushar. It worked – sourav Dec 2 '16 at 3:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.