UploadDocument
Uploads a document in Salesforce.
Note: This procedure makes use of indexed parameters. Indexed parameters facilitate providing multiple instances a single parameter as inputs for the procedure.
Suppose there is an input parameter named Param#. To input multiple instances of an indexed parameter like this, execute:
EXEC ProcedureName Param#1 = "value1", Param#2 = "value2", Param#3 = "value3"
In the table below, indexed parameters are denoted with a '#' character at the end of their names.
Input
Name | Type | Accepts Input Streams | Description |
FullPath# | String | False | The full path to the document to upload. If Base64Data is not specified, this input is required. Either specify this or FullPath/FolderPath for a single object and not both. |
Base64Data# | String | False | A string of data that will be used as the full contents of the file. This must be base-64 encoded. Required if FullPath is not specified. |
Name# | String | False | The name you would like to give the document. If none is specified, the file name specified in the FullPath will be used. Required if Base64Data is specified. |
FolderId# | String | False | Required. Id of the Folder where the documents will be uploaded. |
FolderPath# | String | False | Used to batch upload every file inside a specified folder. Either specify this or FullPath for a single object and not both. |
Description# | String | False | Text description of the Document. Limit: 255 characters. |
Content | String | True | The file content as an InputStream. Only used if FullPath is empty. |
DocumentTempTable | String | False | Used to batch upload multiple Document objects. Set this to a temporary table, whose rows contain upload inputs like in the example below. |
Result Set Columns
Name | Type | Description |
Id | String | The Id of the uploaded attachment. |