If you use Zoho CRM and Zoho WorkDrive for file storage, this is a must-have customisation. I will show you how to create a Zoho WorkDrive folder custom related list that displays the records' WorkDrive folder contents inside the Zoho CRM record
This follows on from my previous WorkDrive integration articles, where I demonstrate how to create an automated WorkDrive Folder structure as well as how to maintain a synchronised WorkDrive Folder structure.
How It Works
Since we store the WorkDrive Folder ID on the record, we can call the WorkDrive API to retrieve the contents of that folder and display it within the record as a custom related list. This enables us to open files or folders directly from the CRM record or download files directly to the computer.
Connection
If you are following from my previous articles, you will already have a connection configured and can use the same one. If not, and you store your WorkDrive Folder ID on the record, you will require the following connection.
Connection Names and Scopes
workdrive_connection
WorkDrive.files.ALL
Head to Settings > Developer Space > Connections
Click Create Connection
Select Zoho OAuth
Enter a Connection Name
Select the required scopes (listed above).
Click Create and Connect
Click Connect
Select your Production System
Click Accept
Arguments
recordId (String)
moduleName (String)
Functions
We will be creating a single function for this customisation and the code is provided below.
To create a function go to Settings > Developer Space > Functions
Click New Function
Enter a Function Name (No Spaces)
Enter a Display Name
Set the Category to Related List
Click Create
Enter code below
Click Save
Ensure you check the API name for the WorkDrive Folder Field (Line 2) in your CRM under Settings > Developer Space > API's > API Names.
If you want to customise the related list further checkout my in depth article on creating custom related Lists in Zoho CRM.
Configuration & Deployment
To deploy the related list function on our records.
Open any record you want to add this related list to and click 'Add Related List'
Click Functions
Click the 'Add Now' button next to the function you have created
Under argument mapping section
recordId argument press the '#' key and select the records ID from the popup.
moduleName type the module you are creating it for.
Note that if you have renamed any modules you need to use the system defined API Name for that module which is Leads / Contacts / Accounts / Deals
Click 'Save'
I hope this article has helped you enhance productivity within your Zoho CRM by expanding on your Zoho WorkDrive Folder integration.
Need Help? Contact us!
Resources
Comments