You need to sign in to do that
Don't have an account?

Validation Rule to stop Opportunity Create on Certain Accounts
Hi All,
We have run into a few issues lately where users of our salesforce instance are creating opporunities against accounts accounts that are 'Closed' are do not belong to us. I wont go into the reasons behind this as its quite complicated.
Bascially I'm trying to write a validation rule that will stop opportunities being created against Account numbers starting with '4' and/or accounts that are closed. These fields are currently not on the opportunity screen but do exist on the account screen.
Does anyone have any guidance as to how I can write the validation rule?
We have run into a few issues lately where users of our salesforce instance are creating opporunities against accounts accounts that are 'Closed' are do not belong to us. I wont go into the reasons behind this as its quite complicated.
Bascially I'm trying to write a validation rule that will stop opportunities being created against Account numbers starting with '4' and/or accounts that are closed. These fields are currently not on the opportunity screen but do exist on the account screen.
Does anyone have any guidance as to how I can write the validation rule?
Update your validation to: This should solve your problem. We are using OR coz, OR is suprset of AND.
Can you take a moment to upvote and mark this answer as solved, if it helped you.
Cheers!
Ajinkya Deshmukh
All Answers
Here is the validation for checking if the account number starts with 4. There is a function- BEGINS for your rescue here! How are you capturing if the account is closed? Is there any checkbox or picklist value? I need the api name and type of that value to add to the validation.
Please upvote and mark this answer as solved, if it helped you.
Cheers!
Ajinkya Deshmukh
I really appreciate your help with this. That validation rule works 100% spot on!
We currently capture 'Account Status' using a picklist field named 'Customer_Status__c' with the options of A, C or S, with C meaning Closed.
Raymond
Update your validation to: This should solve your problem. We are using OR coz, OR is suprset of AND.
Can you take a moment to upvote and mark this answer as solved, if it helped you.
Cheers!
Ajinkya Deshmukh
Thank you so much for help me with this, it works perfectly.,
Thanks Again,
Raymond