function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
krishna guptakrishna gupta 

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

Hi,

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

Hi,

Try this one its works fine, 

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

Thanks,
Saroja
SweetPotatoTec

Bhargavi TunuguntlaBhargavi Tunuguntla
Hi

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  ) ) )