How can I create a
Validation Rule that makes a field required if some other fields are not null?
For example, if I were to enter a
Years of Experience should become required.
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
Here I have taken the example as : For Opportunity object , when Account id provided as an input then Description and Competitor information are mandator:
At validation rule "Error Condition Formula" will be as below :
IF(AccountId != null, ( IF( OR(Description == null, MainCompetitors__c == null) , true, false) ), false )
This will work.
PS: Please replace your field with the above rule fields.