Account PDF Viewer
Display and annotate PDFs attached to any record, directly from the record page.
Objective
Allow users to quickly and seamlessly display an Invoice PDF from an account, without app navigation and with no-code.
Solution
This solution uses Avonni Dynamic Components combined with Salesforce automation, all built with no code.
User get a clear view of related Invoices where they can view PDF documents in one click.
How It Works (User Perspective)
A user opens an account record and navigates to the Invoice list
They click on an Open PDF button next to the Invoice
The related PDF is automatically displayed
If there are multiple PDFs, a picklist offers them to choose from before the selected document is displayed
What we'll create
1 Avonni Dynamic Component to allow users to view records and take action
1 screen Flow to handle automation
1 custom Bill object representing our invoices that will hold the ContentDocuments
Set up
Prerequisite: Create the Bill Custom Object
Create a Bill__c custom object to represent your Invoices, with a lookup to Account.
Use all other configurations you'd like
Configure the Screen Flow
In Flow Builder, create a Screen Flow
Although it won't have screens, this needs to be a screen flow in order to be launched from a row-level action within the Dynamic component
For this example, tour flow will be named
AV_Get_ContendDocument_for_Bills. This will be referenced further in the Dynamic Component.
Create the Dynamic Component
Launch the Flow from an interaction
Create a Flow Dialog Interaction to launch the flow from the row-level button
Important : Make sure to pass the row record id into the flow
recordIdinput variableImportant :
Make sure to retrieve the flow
vContentDocIdoutput variable into a textvContentDocumentTxtvariableMake sure you retrieve the flow
vContentDocumentIdsinto a text collection variablevContentDocumentIds
Build a Combobox component
Add a Combobox component to let users choose from a document list if multiple PDFs were found
Set the Data source to a query
Get Content Documents where their Id is IN the
vContentDocumentIdscollection
Set up an interaction to assign the selected record Id to the variable
vContentDocumentTxtSet up conditional visibility. The component should only display if multiple documents were retrieved by the flow : if
vContentDocumentIdsis not empty
Going further
Dynamic components used in this use case
Last updated
Was this helpful?
