CloudFiles Client
CloudFiles exposes an Apex class named cldfs.Client. This class has all the CloudFIles functions exposed in apex. In this article, we documents all these functions.
To use these functons or other apex types, please prefix by CloudFiles namespace cldfs. For example - cldfs.createFolders(...)
Add To Dataroom - This function is used to add content to a dataroom.
Create Attachments - This method can be used to create attachments using Apex.
Create Content Version Batch - This method will create content versions of a batch of files in Salesforce using Apex.
Create Datarooms - This function is used to create datarooms.
Create File Requests - This function is used to receive files from customers.
Create Folders - This function creates folders in external storage like SharePoint, Google Drive etc.
Create Folders Async - This function creates folders in external storage like SharePoint, Google Drive etc. This method runs asynchronously.
Create Links - This methond is used to create CloudFiles Link(s).
Copy Resources - This function can be used to copy resources (files/folders) from one location to another within the same external storage drive.
Copy Salesforce Files - This function is used to copy Salesforce files to external storage by queuing them, with the queue processed at a dynamic rate based on the external library.
Delete Attachment - This method can be used to disconnect a file/folder from a Salesforce record.
Delete Resource - This function allows you to delete a resource (file or folder) in a connected external storage, such as SharePoint, Google Drive, Dropbox, Box, or AWS S3 using apex.
Generate Document (Sync) - This function is used to execute Generate Document (Sync) action using Apex.
Get Attachments - This function is used to retrieve all resources (files or folders) connected to a record via apex.
Get Connected Folder - This method retrieves folder-type attachments for a Salesforce record, such as the Account Parent folder details, using Apex.
Get Event Details - This action can be used to get the details of a CloudFiles Event using apex.
Get Folder Contents - This method is used to get contents of the folders stored in external storage like SharePoint, Google Drive etc.
Get Preview URL - This function is used to get the preview url for a file using getPreviewUrls method.
Get Salesforce Files - This method enables retrieval of Ids of all Salesforce files attached to a specific Salesforce record.
Move Resources - This function can be used to move resources (files/folders) from one location to another within the same external storage drive.
Process Document using AI - This function is used to execute Process Document using AI action using Apex.
Query Document - This function is used to execute Query Document action using Apex.
Search by Resource Metadata - This function is a specialised feature designed for use with SharePoint and MS Teams, focusing on custom properties that allows users to efficiently search and manage resources(files & folders) by tags (metadata columns) using Apex.
Update Permissions - This function is used to provide/revoke permissions for the files/folders in the external storage.
Update Resources - This function can be used to update resource (file or folder) properties like name, description etc.