0

today i'm trying to upload some files to SF using Content objects. I already uploaded the ContentVersion record and the image is in SF now. The problem is when i try to upload the ContentDocumentLink record i get the error ContentDocument ID: id value of incorrect type: .

I was following this

https://help.salesforce.com/articleView?id=000314772&type=1&mode=1

But when the dataloader ends, there is the error. I remember that like one or two months ago i uploaded a lot of files but i think that i used ContentDocument instead ContentVersion.

Anybody has the same error?

Thanks in Advance

1

After creating both the ContentDocument and ContentVersion Records. You should be able to pull the ContentDocument's contentDocumentId and use that for the ContentDocumentLink's contentDocumentId.

Can you share an example screen capture?

  • 1
    Hi after try and try again found it. You are totally right, I was using the ContentVersion id as the contentDocumentId. as soon as you create a record in ContentVersion Object, you create a ContentDocument record too. You have to export it with Data Loader and find the records that you uploaded (I use the field "description" to set an unique identifier). Then you will have the ID that must be in ContentDocumentLink's contentDocumentId. – Piojo Nieto Jun 13 at 22:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.