Conga Product Documentation

Welcome to the new doc site. Some of your old bookmarks will no longer work. Please use the search bar to find your desired topic.

FILE is the related List or in Attachments and you need an IMAGE

When FILE is the related List or there is a file in Attachments and you need to grab an IMAGE. The image must be in the document, not an attachment.

  1. Navigate to Salesforce Setup > Salesforce Files > Fields to create a custom field on the Salesforce File Object.
  2. Create a new formula text field and name the field. For this example, the field name is File Image URL.
  3. Enter the following URL: LEFT( $Api.Enterprise_Server_URL_100, FIND( ".com", $Api.Enterprise_Server_URL_100 ) + 4)& "sfc/servlet.shepherd/version/download/" & Id
  4. Create a Conga Query with this syntax: SELECT ContentDocument.LatestPublishedVersion.Image_URL_Formula__c FROM ContentDocumentLink WHERE LinkedEntityId = '{pv0}' AND ContentDocument.FileType IN ('PNG','JPG','JPEG')
    Note: If you want to filter with the title instead of the file type, then use this field: ContentDocument.Latestpublishedversion.Title
  5. In the button URL, add the Query: &QueryID=[FileImages]IDofQuery
  6. In the template, the following should appear: {{TableStart:FileImages}}{{IMAGE:LATESTPUBLISHEDVERSION_FILE_IMAGE_URL}}{{TableEnd:FileImages}}
  7. In Solution Manager, click Add Query Data.