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


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 Answer 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. Jun 13, 2019 at 22:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .