function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Debbie61Debbie61 

What to use for the External ID for the Document object?

I am trying to use the upsert command for uploading documents but I am not understanding what I am suppose to pass to SFC api for the External ID of the document array?

 

I have tried "DocumentId" and I have tried "Document_ID" and both throw this error:

"SoapException: INVALID_FIELD: Field name provided, Document_ID does not match an External ID for Document"

 

Here is my code:

sforce.UpsertResult[] sfcResults = binding.upsert("Document_ID", docsToUpload);

 

 

 

Best Answer chosen by Admin (Salesforce Developers) 
Debbie61Debbie61

You use the Name field of the Document which is marked in the API as an IdLookup field.

For example:

 

sforce.UpsertResult[] sfcResults = binding.upsert("Name", docsToUpload);