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
vinothvinoth 

Validation On Attachments

Hi,

       I need to allow the user to add only two attachments in the record. How can i achieve this?

       Can we achieve by using validation?

Plz Guide me!

 

Thanks

vinoth

Best Answer chosen by Admin (Salesforce Developers) 
Dirk GronertDirk Gronert

Using a trigger on ContentDocument?! http://developer.force.com/releases/release/Spring12/contentdocument+triggers

 

Of course count the existing amount of documents attached to the record as the logic of the trigger ;-)!