Create File Connect Files
Salesforce Files connect can be used to link files from a Cloud Storage to any record in Salesforce. You can easily setup Files Connect following the instructions here. However, Files Connect does not support uploading files directly to a Cloud Storage platform from within the Salesforce.
With CloudFiles, you can upload files in Salesforce which directly go to the Cloud Storage platform like SharePoint, Google Drive etc. without ever consuming your Salesforce storage. Using CloudFiles flow actions, you can also copy a Salesforce file to a Cloud Storage platform automatically.
Using "Create File Connect Files" action, you will be able to create a Files Connect object for a file uploaded/copied through CloudFiles.
- External Data Source Name - This is the name of the external data source, you creates as part of Files Connect setup process. Please note that this is represented by the field DeveloperName on the Salesforce object ExternalDataSource. To get the value of DeveloperName field, you can run this SOQL query in your Salesforce developer console
- File Connect Resource Id- You can get this from the output of "Get Event Details" action we used in the last step. Please use the field name "FileUploaded.FileConnectResourceId"
- Name - Name of the uploaded file. You can get this from the output of "Get Event Details" action we used in the last step. Please use the field name "FileUploaded.Name"
- Salesforce Object Id - Id of the Salesforce record, to which the files connect object should be attached. You can get this from the output of "Get Event Details" action we used in the last step. Please use the field name "FileUploaded.RecordId"
ContentDocumentLink object for the Files Connect file