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

Validation On Attachments


       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!




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

Using a trigger on ContentDocument?!


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