Download
Download Interaction
The Download Interaction adds a download capability directly within an Avonni Data Table component. This allows users to easily download files associated with individual records displayed in the table, without leaving the current page or navigating to separate file libraries.
Overview
The Download Interaction provides a streamlined way to make files related to your Salesforce records accessible within a Data Table. This improves user experience and efficiency by eliminating the need to navigate away from the table to find and download files.
How it Works
The Download Interaction is configured within an Avonni Data Table component. Here's the process:
Data Table Setup
Your Data Table should be configured to display records from a Salesforce object with associated files (e.g., Cases with attached documents, Accounts with contract files, etc.).
You'll need a way to identify the file associated with each record. This is usually done through one of these methods:
A field containing the Content Document ID of the associated file.
A field containing a URL pointing directly to the file.
A relationship to the
ContentDocument
object (this is less common for direct download links, but possible).
Add the Download Interaction
Select the Avonni Data Table component in your page editor.
Add "Actions" or "Button" columns in the component's properties panel.
Add a new interaction and choose the "Download" type.
Configure the Download Interaction
URL Field: (Optional) Select the field from your Data Table's data source that contains the file's URL. If you provide a URL, it takes precedence over the Content Document ID.
Content Document ID Field: (Optional) Select the field from your Data Table's data source that contains the Content Document ID of the file.
Auto Generate Public Link: (Optional, but very important)
If checked (enabled): The component will attempt to generate a publicly accessible link for the file. This allows users without Salesforce login access to download the file.
If a public link already exists for the Content Document, it will be used.
If no public link exists, one will be automatically created. Important: This makes the file publicly accessible via the generated link.
If unchecked (disabled): The component will generate a download link that requires Salesforce authentication. Only users logged into your Salesforce org with sufficient permissions can download the file.
Important Note
The URL Field takes precedence. If both a URL field and a Content Document ID field are provided, the component will use the URL. If you use Auto Generate Public Link, be very careful about data security.
User Interaction
When the Data Table is displayed, a download icon will appear in the configured column or next to each row.
Clicking this icon will initiate the download of the file associated with that specific record.
Example Use Case: Case Attachments
Let's say you have a Data Table displaying a list of Cases. Each Case might have an attached file (e.g., a screenshot, a log file, a PDF report).
Data Source: Your Data Table's query retrieves Case records. It should also include:
The
ContentDocumentId
of the attached file (this is the standard way to link files to records in Salesforce). ORA custom field on the Case object contains a URL pointing to the file.
Download Interaction: You add a Download Interaction to the Data Table.
You would select either the
ContentDocumentId
field or the custom URL field.You would decide whether to enable "Auto Generate Public Link" based on whether the files should be accessible to users outside of Salesforce.
Result: The Data Table will display a download icon for each Case. Clicking the icon for a specific Case will download the file associated with that Case, either through a Salesforce-authenticated link or a public link, depending on your configuration.
Key Benefits
Integrating the Download Interaction offers real advantages:
Less Clicking, More Doing (Streamlined Workflow): Users don't have to leave the table and hunt for files on record pages. They download right from the row, saving time and effort.
Happier Users (Improved UX): Getting files directly linked to the data they're looking at is simply more convenient and intuitive.
The Right File, Right There (Contextual Access): The download icon sits next to the record it belongs to, removing guesswork and ensuring users grab the correct document
Important Considerations
Permissions: To download the files, users must have the necessary Salesforce permissions (e.g., "View Content" on the ContentDocument object, or appropriate sharing settings).
Field Availability: Ensure that the field containing the Content Document ID or URL is included in your Data Table's data source.
URL Validity (if using URLs): If you use a URL field, ensure the URLs are valid and accessible.
Public Link Security (if using Auto Generate Public Link): Be extremely cautious when enabling "Auto Generate Public Link." This makes files publicly accessible, so only use it when appropriate and with a complete understanding of the security implications. Consider using a short expiration time for public links.
In Summary
The Download Interaction provides a powerful way to add direct file download capabilities to your Avonni Data Tables. Carefully consider whether to use Content Document IDs or URLs, and be mindful of the security implications of the "Auto Generate Public Link" option.
Last updated
Was this helpful?