How to Declaratively Handle with Flow When Files are Shared to Records

How to Declaratively Handle with Flow When Files are Shared to Records

Recently I was talking with Michelle Hansen who had the use case that she’d like to run a Flow when a file is shared to a record.

Naturally, she explored options with Process Builder and saw that the ContentDocumentLink object (which links a file to a record) wasn’t supported. 😭😭😭

No alt text provided for this image

Not to be deterred, Michelle and I collaborated to develop an Apex trigger that could know when a file was being shared to a record and then call an autolaunched flow where the business logic could be implemented declaratively.

No alt text provided for this image

With the trigger deployed and a flow for it to call, admins can now implement their own business logic declaratively to handle when files are being shared to records. Hooray!

No alt text provided for this image

Read the full blog post to learn more about this solution and how to get it deployed to your org.

###

I’m a Salesforce Developer and Technical Leader. Learn more about my passion for Salesforce.com solutions @DouglasCAyers and douglascayers.com.

To view or add a comment, sign in

More articles by Doug Ayers

Explore content categories