How to get Images from Content Files on a records related list.
*** Merging Images from content files is currently not a built-in managed feature. Below is a custom workaround using a custom formula field and SOQL.
1. Build a custom formula field on the Salesforce Files Object to form a URL to the Content document Image:
(Salesforce Lightning) Navigate to: Setup → Object Manager →Content Version →Fields & Relationships→ Add New Field → Type = Formula. (Salesforce Classic) Navigate to: Setup → Build → Customize → SalesforceFiles → Field → Type = Formula.
2. Create a formula field. Formula for the URL field:
3. Create the SOQL relationship in the DocGen Package:
Parent Object Files -SOQL: Copy Type = Table or Row SELECT ContentDocument.LatestPublishedVersion.URL_Formula__c FROM ContentDocumentLink WHERE LinkedEntityId = '<<Parent_Object_Id>>' AND ContentDocument.FileType IN ('PNG','JPG','JPEG')
Table > Row Replicate Child Object - SOQL: Copy Type = Table Select id, name, (SELECT ContentDocument.LatestPublishedVersion.URL_Formula__c FROM ContentDocumentLinks WHERE ContentDocument.FileType IN ('PNG','JPG','JPEG')) FROM Child_Object__c WHERE Parent_Object__c = '<<Parent_Object_Id>>'
** Please find the correct corresponding Child_Object__c & Parent_Object__c API names for your environment and the correct <<Parent_Object_Id>> tag.