Custom Object Creation on File Upload Test Drive
In this test drive, we will check how CloudFiles can create custom object records when files are uploaded into record linked folders in external storage. These custom objects are useful for searching files in global search or for storing file metadata in salesforce for reporting purposes.
Follow the instructions in the next section to test. The subsequent sections explain the setup for this test drive as well as what else is possible as an extension of this test drive.
To test out this feature, follow the simple instructions below :
- Go to 'Work Orders' tab and create a new Work Order. This should create a SharePoint folder visible in the 'Files' tab of the record.
- Upload a few files into the Work Order Folder from the widget. These files can be of any type or size.
- Refresh the page. In the 'Work Order Documents' related list, you will find newly created records for each file uploaded into the Work Order Folder.
- The Names and SharePoint URLs of the uploaded files are populated into the relevant fields of the corresponding Work Order Document records.
- You can try searching for the file name in the global search and would come across the correct result.
Flow execution and folder creation may take some time (a few seconds to a minute). If you don't see anything in the Files Tab, try refreshing the CloudFiles widget a couple times.
The GIF below gives a visual representation of these steps
The following video shows the flow that made this possible.
In this test drive, we've seen how CloudFiles can create custom object records when files are uploaded into Work Order folders in Sharepoint. However, there are many variations of this possible such that it can fit your custom use-case. Check the pointers below:
- The same can be configured with any other external storage including Google Drive, Amazon AWS S3, OneDrive, Azure, Dropbox etc.
- Here we have configured custom object record creation with file uploads into Work Order folders. However, you can extend this to uploads into folders connected to any Object.
- You can populate the custom object's fields with other properties as well such as the resource's path in external storage, file size, etc.
- The same functionality can also be extended to file uploads on Experience Cloud Sites too.
- The created custom objects can be used in global search to search for a file using it's name or metadata.
- These custom objects can also be used for reporting purposes.
You may find other test drives equally engaging. Do visit the Test Drive article to explore other test drives.