***Disclaimer: The following blog post is about the paid AppExchange app, Enhanced Attachment, developed and published by my company Adviceforce, LLC.
With Enhanced Attachments, attachment categories totals of each attached file can be rolled up to a custom number field on the parent record. With this feature not only can you have better insight on how many types of attachments are linked to a record but also create validations to make sure fields are not updated unless a certain type of document is attached.
The below example will have us create a custom number field on the Opportunity object that will store totals of number of Sales Contracts that have been attached to an opportunity record.
We will then create a validation will that will prevent people from updating the opportunity stage to closed won unless there is at least one sales contract attached to the record.
After linking the number field via the Attachment Settings tab of the app, each time an attachment of type “Sales Contract” is loaded to the Opportunity record, the field will be refreshed with a the new total.
Please note that the validation and field is not included with the app and is used as an example of how the attachment category roll-up can be beneficial to keeping data quality in your org.
Here is a quick video showing the scenario of someone moving an opporutnity stage to Closed Won before attaching the required documents.
Hope you found this interesting, please feel free to check out the listing on the AppExchange for the app for more information, demos, and ways to contact us.