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
sanjusfdcsanjusfdc 

Validation Rule for all users

If ABC field is blank, status(picklist) can only be None or Canceled. note- Please assign ABC before changing status. 
Devi ChandrikaDevi Chandrika (Salesforce Developers) 
Hi,
Give this formula for above validation
Not(AND(ISBLANK(abc__C), OR( ISPICKVAL(status,''),ISPICKVAL(status,'cancelled'))))

Hope this helps you
Let me know if this helps you. Kindly mark it as solved so that it may help others in future.

Thanks and Regards
 
sanjusfdcsanjusfdc
Hi @ Devi,
its working half part like if ABC field is blank thn Status should be either "None" or "Cancel" but its taking other values also and got saved, it should throw an error.
Devi ChandrikaDevi Chandrika (Salesforce Developers) 
Please try this formula.I tested this in my org.
(IF(ISBLANK(abc__c ),
NOT(OR( ISPICKVAL(status,''),ISPICKVAL(status,'canceled')))
,FALSE))

Hope this helps you
Let me know if this helps you. Kindly mark it as solved so that it may help others in future.

Thanks and Regards