Signature
global static List<Attachment> createAttachments( List<Types.CreateAttachmentInput> attachmentInputs, String library, String runAs )
Parameters
| Parameter | Description | |
|---|---|---|
attachmentInputs |
required | One entry per attachment. See Types.CreateAttachmentInput. |
libraryString |
required | Type of library. Example — sharepoint. You can get this value from the Content Library. |
runAsString |
optional | Email Id of the user on whose behalf the function should run. To run the action as the automation user, supply integrationUser. |
Return Type
List<Attachment>
Example
List<cldfs.Types.CreateAttachmentInput> inputs = new List<cldfs.Types.CreateAttachmentInput>{ new cldfs.Types.CreateAttachmentInput(<folder id>, 'folder', <salesforce record id>, 'b!ZfA15HRS1Uy9pH3Vw5tFjAHfP1lRYlZAvDwLnHYYq8sa-L6ejXB-TJbMYUxi1QfL') }; List<cldfs.Attachment> attachments = cldfs.Client.createAttachments( inputs, 'sharepoint', 'integrationUser' );