+ Start a Discussion
Felipe FernandesFelipe Fernandes 

Validation rule

hi

 

I have to make certain fields required based on the input of other fields.

For example, i have two fields: "Phone" and "Mobile Phone", if phone is filled, mobile phone is not necessary. if mobile phone is filled, phone is not necessary.

Can someone please help with this.

 

thanks!

 

Best Answer chosen by Admin (Salesforce Developers) 
SporterSporter

The following should work for you, both fields need to be set to not required before this validation is used and this is based on the standard Phone and Mobile phone fields:

 

 

ISBLANK(Phone) && ISBLANK( MobilePhone )

 

 

All Answers

SporterSporter

The following should work for you, both fields need to be set to not required before this validation is used and this is based on the standard Phone and Mobile phone fields:

 

 

ISBLANK(Phone) && ISBLANK( MobilePhone )

 

 

This was selected as the best answer
Felipe FernandesFelipe Fernandes

The code worked for me! Thanks!