You need to sign in to do that
Don't have an account?
Andyux
Validation rule - Opportunity without products
How would i create a field (formula?) to check if a opportunity has products that can use for validation logic:
IF
productscount>0
AND
Probability>50%
Then - error message " Must add products to the opportunity"
IF
productscount>0
AND
Probability>50%
Then - error message " Must add products to the opportunity"
AND(NOT(HasOpportunityLineItem), Probability>0.5)
All Answers
Let us know if this will help you
2) I am not sure how this will work all in a formula, i am setting a validation rule. Thanks!
Give it a try.
First create a Roll Up summary field on opportunity named as 'ProductsCount'.
And then use below formula.
If(Product_Count__c >0 && Probability>0.5, true,false)
For your requirement I thing "Amit" give right way but there is little bit change you need to create the rollup summery field of product for productsCount and apply same forumla as amit sended.
Thanks.
If the probability is less than .5 - nothing happens - good.
If the probability is greater than .5 - error message shows. Problems is that the error message shows even if there are products in the opp.
The "products count" roll up summary field works, shows
Products Count = 2.00 - thats is correct in this case. But the error still shows.. i am using thanks!
may be you want that when there is no products then error will come up right ?
if so then make a small change in the validation rule.
If(Products_Count__c <0 && Probability>0.5, true,false)
AND(NOT(HasOpportunityLineItem), Probability>0.5)