+ Start a Discussion
krishna guptakrishna gupta 

Opportunity contact email and phone should not be null while creating opportunity


I have a requirement where i have to select the contact, once we save the opportunity record, it should throw error message if phone and email field are blank at contact record.

I am putting the below validtion rule, but it is not working.
AND(ISNULL( Key_Contact__r.Email ) , OR( ISNULL(  Key_Contact__r.Phone  ) , ISNULL( Key_Contact__r.OtherPhone ) ) )
krishna guptakrishna gupta
I used ISBLANK, this is also not working
Saroja MuruganSaroja Murugan


Try this one its works fine, 

IF( NOT( ISBLANK( Contact__c ) )   &&  OR( ISBLANK( Contact__r.Email ),  ISBLANK( Contact__r.Phone )  )  , true, false)


Bhargavi TunuguntlaBhargavi Tunuguntla

The below code may work fine:

AND(NOT(ISBLANK( Key_Contact__c )),ISBLANK( Key_Contact__r.Email ) , OR( ISBLANK( Key_Contact__r.Phone ) , ISBLANK( Key_Contact__r.OtherPhone  ) ) )