You need to sign in to do that
Don't have an account?
Validation Rule on 2 Lookup Fields
Hi All,
I have an object with 2 lookup fields in it. My scenario goes in this way-
1. If User selects both the lookup fields in detail page and Click on Save, it should throw the Validation Error to select any one of lookup instead of both
Thanks
I have an object with 2 lookup fields in it. My scenario goes in this way-
1. If User selects both the lookup fields in detail page and Click on Save, it should throw the Validation Error to select any one of lookup instead of both
Thanks
if(And(AccountNumber!=null , Description!= null),true,false)
Regards,
Sanpreet
All Answers
You can use below formula in your validation rule :
AND(NOT(ISNULL(First_Lookup_Field__c)), NOT(ISNULL(Second_Lookup_Field__c)))
Please let me know if you need any other help.
Thanks,
Abhishek Bansal.
if(And(AccountNumber!=null , Description!= null),true,false)
Regards,
Sanpreet
Sanpreet logic worked !!
Use ISBLANK instead of ISNULL in new formulas. ISBLANK has the same functionality as ISNULL, but also supports text fields. Salesforce will continue to support ISNULL, so you do not need to change any existing formulas.
Text fields are never null, so using ISNULL() with a text field always returns false. For example, the formula field IF(ISNULL(new__c) 1, 0) is always zero regardless of the value in the New field. For text fields, use the ISBLANK function instead.
Hope this will help :)
Regards Pranav