Fields

Fields
ParameterDescription
fileId
String
requiredThe resource Id of each file for which content version needs to be created.
driveId
String
requiredDrive Id in external storage.
library
String
requiredThe related files library such as cloudfiles, google, sharepoint etc.
context
String
requiredThis parameter is used to identify and manage the source of a created Salesforce File when a 'Content Version Created' event is triggered. It should be in JSON format, for example: {"recordId": "00QdL000009q8txUAA"}.

Constructors

global CreateContentVersionPayload(
  String fileId,
  String driveId,
  string library,
  String context
) {
  this.library = library;
  this.driveId = driveId;
  this.fileId = fileId;
  this.context = context;
}

Example

List<cldfs.Types.CreateContentVersionPayload> files = new List<cldfs.Types.CreateContentVersionPayload>{
    new cldfs.Types.CreateContentVersionPayload(
        '01KEHAKUUSU3E5OUXBBJGLYTD3IZU4BCRV', //fileId
        'b!nJBtPq_z5UeJtFrj_f24XEQqlPUD8vtFsg7GBcrXJepiUn9bkb_7QbDPtqHVD-cP', //driveId
        'sharepoint', //Library
        '{"recordId": "00QdL000009q8txUAA"}' //recordId Json
    )
};
cldfs.Client.createContentVersion(files, 'integrationUser');