You need to sign in to do that
Don't have an account?
raji devi 1
Validation for lookup field and checkbok
Hi All,
I have contact object with 1 lookup Account name field and create_account__C checkbox custom field in it.(I have a trigger on this if check box is checked account is created, i.e every contact has account record)
My scenario goes in this way-
1. If User selects both the lookup field and check box in detail page and Click on Save, it should throw the Validation Error to select any one of lookup or check box instead of both
2. if user didnot select lookup field and check box in detail page and click on save , it should throw the validation error to select any one of lookup and check box
Thanks in advance.
I have contact object with 1 lookup Account name field and create_account__C checkbox custom field in it.(I have a trigger on this if check box is checked account is created, i.e every contact has account record)
My scenario goes in this way-
1. If User selects both the lookup field and check box in detail page and Click on Save, it should throw the Validation Error to select any one of lookup or check box instead of both
2. if user didnot select lookup field and check box in detail page and click on save , it should throw the validation error to select any one of lookup and check box
Thanks in advance.
Try This:
IF((AccountId <> '' && create_account__c),True,IF((AccountId == '' && !(create_account__c) ), True,False ) )
Thanks,
AG
All Answers
Try This:
IF((AccountId <> '' && create_account__c),True,IF((AccountId == '' && !(create_account__c) ), True,False ) )
Thanks,
AG
try the below statement in the validation rule
and(create_account__C = true, not(ISBLANK(lookup field here ) ))
the error message will e like this: enter either account lookup value or check box.
Thanks,
rushiE