You need to sign in to do that
Don't have an account?
New opportunity validation rule
Hi,
I created this validation rule on the opportunity to prevent users creating new opps if the account has not passed credit checked. (one of the business rules)
AND(ISNEW(),
true, Account.Credit_Check_Passed__c = false)
It works fine but when converting a lead, this rule prevents from converting. The "Do not create a new opportunity upon conversion" box is checked by default, and when unckecking it, the validation rule prevents conversion.
I have been trying to add: AND (ISNEW(), Accountid...... with no luck. How can I make sure that this validation rule only applied when the acocunt is not new.
Thank you
Hi Edit I think if you create a custom field in the Lead and Opportunty (like a checkbox) with default values set to
Lead.Checkbox = TRUE
Opportunity.Checkbox = FALSE
Then map the Lead.Checkbox to the Opportunity.Checkbox and add the field to your VR you should be all set.
In this scenario if the Opportunity comes from a converted Lead the checkbox the VR is ignored, but if the Opportuniuty come from an Account the VR is invoked.
All Answers
Try This
AND(Not(ISNEW()),
Account.Credit_Check_Passed__c = false)
Thanks,
The good news is that I can convert a lead...
However it doesn't work when I create an opportunity from the account (ie. I can still create an opportunity even if the account has not passed credit check).
Thanks
How can I make sure that this validation rule only applied when the acocunt is not new. Sorry i got this wrong i thought When Opportunity is not new
Hi Edith,
Can you post the VR you're using on the Opportunity?
Isn't your validation rule performing exactly as desired? You don't want an opportunity created if the Lead hasn't passed a credit check, and you can convert if you don't have it create an opportunity on conversion.
-Andy
Hi guys,
Sorry for the confusion if I have missed a bit in the explanation.
On the account, a field called: Account.Credit_Check_Passed__c which must be true for an opportunity to be created.
When a lead is converted and creates a NEW account, the rule should be ignored as at that stage the credit check hasn't been done.
When an opportunity is created from an existing account, the rule should fire when the Account.Credit_Check_Passed__c is false.
@Stevemo, this is the rule I'm using:
AND(Not(ISNEW()),
Account.Credit_Check_Passed__c = false)
It lets me convert the lead as I have defaulted the "do not create an opportunity upon conversion" to true. But when I create an opportunity from that new account (and credit check=false), it doesn't stop me from doing it. How can I reference the account as being not new in this?
Thanks!
Hi Edit I think if you create a custom field in the Lead and Opportunty (like a checkbox) with default values set to
Lead.Checkbox = TRUE
Opportunity.Checkbox = FALSE
Then map the Lead.Checkbox to the Opportunity.Checkbox and add the field to your VR you should be all set.
In this scenario if the Opportunity comes from a converted Lead the checkbox the VR is ignored, but if the Opportuniuty come from an Account the VR is invoked.
Hi SteveMo,
Thanks a lot for this, it did the trick, perfect! :)
Edith
No problem, you owe me a beer!
And I drink THESE! http://beeradvocate.com/beer/profile/863/7971