You need to sign in to do that
Don't have an account?
Validation Rule: check if Lost To is filled in
I'm trying to build a validation rule that checks if a Lookup field 'Lost To Account' is filled in when an Opportunity is in Stage = Closed Lost. There is no syntax error but it's not prompting error message when I change an Opp. to Closed Lost and do not fill in Lost To Account field:
AND(ISPICKVAL(StageName,"Closed Lost" ),
$RecordType.Id = "012000000008WTHAA2" ,
NOT(ISPICKVAL(Type, "Accounting Adjustment" )),
NOT(ISPICKVAL(Type, "New Partner" )),
NOT(ISPICKVAL(Type, "Partner (Agency)" )),
NOT(ISPICKVAL(Type, "Partner (Technology/OEM)" )),
NOT(ISPICKVAL(Type, "Patner (Integration/Referral)" )),
( $User.FirstName = "xxx" ),
ISNULL(Lost_To_Account__r.Name))
I implemented a similar thing on our SFDC.Org (albeit more stripped down) anyway, here's my code.
If the Opportunity.Stage = Lost then the user is required to specify a Loss Reason (related picklist). If they sepcify that it was lost to a Competitor, then they have to select the Competitor Account.
AND (LEN( Lost_To__c ) < 1, ISPICKVAL( Loss_Reason__c ,"Competitor"))
All Answers
I implemented a similar thing on our SFDC.Org (albeit more stripped down) anyway, here's my code.
If the Opportunity.Stage = Lost then the user is required to specify a Loss Reason (related picklist). If they sepcify that it was lost to a Competitor, then they have to select the Competitor Account.
AND (LEN( Lost_To__c ) < 1, ISPICKVAL( Loss_Reason__c ,"Competitor"))