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
yash mehta 12yash mehta 12 

What is the validation rule for

if Task Type = Call and Call Type field is empty
OR if Task Type = Event and Demo Type field is empty

I made it like this
CallType  =  ISBLANK(expression) ||  Demo_Type__c  =  ISBLANK(expression)
Best Answer chosen by yash mehta 12
Raj VakatiRaj Vakati
Hi Yash , 
Use this . 
OR( 
AND(Text(TaskType) ='Call' ,ISBLANK(Text(CallType))) , 
AND(Text(CallType) ='Event' ,ISBLANK(Text(Demo_Type__c))) 
)

All Answers

Raj VakatiRaj Vakati
Hi Yash , 
Use this . 
OR( 
AND(Text(TaskType) ='Call' ,ISBLANK(Text(CallType))) , 
AND(Text(CallType) ='Event' ,ISBLANK(Text(Demo_Type__c))) 
)
This was selected as the best answer
yash mehta 12yash mehta 12
Hey Rajamohan it's showing me error.
Error
Raj VakatiRaj Vakati
Hi Yash, 
Please check the API Names if you are using other than task object.  If you are using task object check the FLS for TaskType . 

 
Amit Chaudhary 8Amit Chaudhary 8
I hope field name is Type

Try below validation rule
OR( 
	AND(Text(Type) ='Call' ,ISBLANK(Text(CallType))) , 
	AND(Text(Type) ='Event' ,ISBLANK(Text(Demo_Type__c))) 
)

Let us know if this will help you
 
tulasiram chtulasiram ch
Yes mehtha 12 , TaskType and CallType fields are doesn't exist. Try amiths code, is fine

OR(
       AND(Text(Type) ='Call' ,ISBLANK(Text(CallType))) ,
       AND(Text(Type) ='Event' ,ISBLANK(Text(Demo_Type__c)))
     )