Close this search box.

Our Work: Displaying Related Images in Conga

Red Argyle Logo without name
Red Argyle logo

Every so often, we want to make sure we are highlighting some of the awesome work we are doing. Keep reading to hear about the work that Senior Consultant, Lindsey Kiefer, did on displaying related images in Conga….

What we did

“This was a fun one! Our team was working on two separate Conga Composer merges for a client. This particular client was using an installed package that had its own version of a CMS and doesn’t follow Salesforce’s CMS rules. Not following these rules caused major issues when merging images into a document from related records. Here’s the tale of how we solved this issue. 

Here’s a general idea of the schema of the data we were working with for these document- You have your main object that we’ll call an Activity. Then you have other objects that are related to Activities through junction objects. Finally, each of these objects can have a “record image” that is stored in Salesforce as a File but is not directly related to the parent record in Salesforce using the ContentDocumentLink but instead using a custom Attachment object. 

First things first, make sure you’re using an OAuth URL in your button or this won’t work. You won’t be getting the link to the image on the master record and that makes Conga very sad. 

Next, create a custom formula on the ContentVersion object that generates the URL for the image preview. This allows Conga to get the URL in the initial query using a nested subquery. This makes a difference with the authentication protocol. 

Finally, we had some code we ran before calling Conga that would go find these related Attachments for all the records that would be queried in the Conga merge and generate ContentDocumentLink records setting LinkedEntityId to the Activity or related record. “

Interested in this project for your own organization? Contact Us to get more info.

Red Argyle logo
Red Argyle logo

Related Blog Posts