cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Upload new Version to SalesForce ContentVersion

john316swan
New Contributor

I am trying to upload a new version of a file into SalesForce Content version. I read through SF documentation and it says all you need is:

1. ContentDocumentId
2. ReasonForChange
3. PathOnClient (path of the file on the client machine)
4. VersionData(path of the file on the client machine)

However, no matter what I try I can't get a new version of the file to upload. I can upload a document, but anytime I try to update it I get an error in SalesForce Bulk Data Load Jobs along the lines of:

<errors>
<message>You cannot update a version that is not the latest version of a document. Please use the latest version of document Joe Test 2324 Cost Worksheet.pdf.</message>
<statusCode>INVALID_STATUS</statusCode>
</errors>
<errors>
<message>You can't set the VersionData when IsMajorVersion is true.</message>
<statusCode>INVALID_STATUS</statusCode>
</errors>

I am not setting the IsMajorVersion to true, but I am assuming it doesn't like that the previous version is. Here is what my pipeline looks like: 

john316swan_1-1698785369905.png

And here is the final snapper after I looked up the Record Id: 

john316swan_0-1698785345133.png

 

0 REPLIES 0