Download File (8 min)
01 Getting Started
02 Setup
- Lookup - Configured to pull the Contact Object in Salesforce.
- File Uploader - Configured to push the uploaded file to the Salesforce contact.
- Button - Configured to push the files to Salesforce when clicked.
- Table View Table - Configured to display the contact’s associated files
03 Table Configuration
1. Insert a Table View element into your project. The Salesforce Configuration window opens.
2. In the Select Source step, choose Files as the Salesforce source. Click Next.
3. In the Conditions step, configure that the First Publish Location ID equals the Lookup Value.
4. In the Mapping step, add 5 items, configure them as follows, and click Apply.
- Column 1 - Title
- Action 1 - Button - On Click Action - Download
- Action 2 - Icon - On Click Action - Bin Icon
- Column 4 - ContentDocument ID - ContentDocument ID
- Column 5 - Hash Value
The table should display as follows:
04 Hiding the Hash Value Column
1. Click the Table gear icon. The Table settings menu opens.
2. Select the Columns tab and click the Hash Value gear icon.
3. Disable the Show Column checkbox. This means that the information will still be stored but not shown to the end user.
05 Setting Up Variables
To populate the hash value, we will need to create a variable.
1. Navigate to the Project Settings and select the Tools tab.
2. Click the Custom Variables gear icon.
3. Create a new static variable labeled - hash. Click Apply. This variable will be used to store the hash value from Salesforce.
06 Download Action
1. Navigate back to the Mapping step of your table configuration.
2. Select On Click Action.
3. Click the Start + icon, choose Variables as the node, and click Next.
4. Use the dropdowns to configure the following then click Next.
- Action - Set Value
- Hash - Value from - Table/Hash Value
5. Enter a Tag and click Insert.
6. Click the Variable Interactivity + icon, choose Export and Download as the node, and click Next.
7. Use the dropdowns to configure the following and click Next.
- Download File
- hash
8. Enter a Tag and click Insert. The On Click Action nodes should display as follows.
07 Preview
Using the lookup, you can find a contact in Salesforce. Any files associated with that contact will be displayed in the table. To download the files, simply click the download button.