How to Approve Files in Salesforce with Triggers and Validation Rules

With Salesforce users have the ability to share, manage and collaborate on files thus providing better control of all critical documents. Over the last few months we have seen many announcements that have came from Salesforce about new features to Salesforce Files. In the meantime, there is also a growing group on the Salesforce Success Community that is focusing on Salesforce Files and listening to our feedback and suggestions. The other day a question was posted in this Salesforce Community about the ability to add an approval process to Salesforce Content. The use case was straight forward in that they would like to create a Salesforce approval process for content on select Libraries. Once a user submits for approval the content would enter the “pending approval” Library. Within this library users could submit documents and then another department would review those documents, approve and move to the published library. Thus making it an official corporate document. This a great use case that I know many of us deal with on a regular basis within our own document management systems.

There is good news – according to the Salesforce Files team this is a feature that is currently on the development road map. So although this can not be done yet (but hopefully soon) there are work-arounds.

  1. One way to achieve this use case is to apply a validation rules on Content that will run when a file is updated.
  2. The other way is to create triggers that initiate when a file is updated.

When taking this approach it will require customization with the triggers and validation rules in order to build out a workflow to perform like a pending approval. For example, you could require that a Contact Name or Contact Email be added as a document property (should be a picklist to prevent typos or bad data) for every file that is uploaded to the Pending Approval library. Then once a file is added the trigger would run letting you extract the contact name or email. Then, you can use that name or email to create a Chatter post or send an email to the person who need to “approve” it. That email would provide a link to the file that was just created.

This suggestion is a courtesy of Arnab Bose Director of Product Management for the Salesforce Files Platform.

By |September 29th, 2014|