How to automatically attach new Notes & Attachments to related records in Salesforce:

Here’s the requirement: when a new Note & Attachment is added to a child record automatically associate it with a related record, too. In this case we’re using PandaDoc on the Order object – when the PandaDoc is completed the Order is automatically ‘Released’ and when the Order is released the completed PandaDoc should attach to the Order AND the related Opportunity. PandaDoc automatically attaches the completed document to it’s related order – this is out of the box functionality. The challenge was relating the completing document to it’s Opportunity, too.

This was easy to accomplish with a flow using the ContentDocumentLink object. Here are the steps:

  • Create a Flow that triggers on, in this case, the Order Object. When Order Status is changed to ‘Released’ trigger the flow.
  • The first Get Records Query in the Flow should check if there’s a ContentDocumentLink where the LinkedEntityID matches the triggering record. This is how we determine if there’s actually a Note & Attachment on this object:
  • Add a Decision element to confirm if there is a ContentDocumentLink. If there is a ContentDocumentLink that means we have a Note & Attachment that should also be shared with the Opportunity so continue the flow. If there is not, just end the flow:
  • If there is a ContentDocumentLink to this parent record, then we just need to create a new ContentDocumentLink where the ContentDocumentID is the record found in the Get Records Query and the new LinkedEntityID is the ID of the related record from the triggering record. In this case the Opportunity ID is already written on the triggering record, but you could add another Get Records query to get related record IDs as needed:

The full flow looks like this – pretty simple:

Picture of Scott Ferrebbe Founder of Lighthill CRM in a light blue shirt and dark blue blazer with the top two buttons of the shirt unbuttoned revealing a white undershirt

The 3 best ways I can help you right now...

  1. Click here to schedule a call with one of our CRM Specialists.
  2. Click here to download our CRM Reality Checklist for Sales Superheroes
  3. Follow me on LinkedIn for exclusive tips, how-tos, resources, etc.

Share:

Facebook
Threads
X
LinkedIn
Email

More content...

3 easy steps to a CRM you can trust

Success Call

Share what’s broken and what “good” looks like.

Plan & Build

Get a simple plan to fix processes, data, and connections.

Launch & Win

Go live, trust your dashboards, and hit your numbers.

You’ll move from CRM chaos to predictable performance with one clear source of truth.

Trust your dashboard.
Lead with confidence.

Pick a time that works for you, and get a simple plan to make your CRM match reality.

Complete the form and we’ll get you scheduled for a CRM Success Call.

THANK YOU!

Click on the PDF below to download

Thank You!

We have your message and one of our CRM Specialists will get back to you shortly.