Download page Retrieving a document stored in a Salesforce file.
Retrieving a document stored in a Salesforce file
In Composer, you can use a query to retrieve documents and files stored in Salesforce. Very helpful for Files instead of Attachments
Use a SOQL query to retrieve files stored in Salesforce when launching a Composer button. To leverage a SOQL query that retrieves files stored in Salesforce, create aConga Queryrecord with the syntax below.
SELECT ContentDocument.id FROM ContentDocumentLink WHERE LinkedEntityId = '{pv0}'
To show the most recent File from the related list, add the following to the query: ORDER BY ContentDocument.LastModifiedDate DESC LIMIT 1
To show File(s) that contain a key phrase, add the following to the query: AND ContentDocument.Title LIKE '%KeyPhrase%'
Add the new Conga Query record to a Composer button URL with the Qvar0ID, Qvar0Format, and TemplateID parameters. Reference the sample syntax below.