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
Anil Kumar 1257Anil Kumar 1257 

I want to write validation on document object , If status is Document completed then This field required like pan card passbook adhar.

AND(
ISPICKVAL(  Status__c  ,"Document Callected"),
OR(ISBLANK( PAN__c ),
AND(ISBLANK( Aadhar__c ),ISBLANK( Cheque_Passbook__c ))),
OR(
RecordType.DeveloperName = 'Documents Collected',
VinayVinay (Salesforce Developers) 
Hi Anil,

You cannot create validation rule on 'Content Document'.

Review below links for more information.

https://developer.salesforce.com/docs/atlas.en-us.sfFieldRef.meta/sfFieldRef/salesforce_field_reference_Document.htm
https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_contentdocument.htm

Review below examples for trigger usage on content document. 

https://ankushsalesforce.blogspot.com/2014/05/trigger-on-contentdocument-object.html
https://keyholesoftware.com/2014/01/13/salesforce-content-in-apex/

Thanks,
Vinay Kumar