My requirement is to upload the documents in Salesforce Documents object through CSV file using dataloader.io. There are approx 10,000 documents that I have to insert in Salesforce. I am creating the CSV as below:

CSV TO Upload

URl - file path from local system, Document name - name of document, folder Id - document folder id, Author id - document owner

I am able to upload this CSV into Salesforce and also the document got created but the Document din't come over actually. It is showing 0 bytes and only shows the Location that we provided.

Here is the screenshot of the document got created.

enter image description here

I also tried giving same url value in body field of document but that din't work and gave me error - "SOURCE: 'Body' DESTINATION: 'Body' ERROR:Body: value not of required type: C:\Users\Sachin Arora\Desktop\BestPractices.txt"

Please assist me what I am doing wrong here.

1 Answer 1


The database record you're creating only holds the link to the document. The document itself is stored/saved as a 'blob' by salesforce in the database at the location that's specified. Uploading it using a CSV file doesn't allow that transformation to a blob to take place if you want Salesforce to store it locally. In your screen capture, you show the source location as being on your C drive. That's leaves it still on your drive, not within Salesforce and only creates a link to it.

  • But If I give base 64 data or url in body field then too it gives me error like - SOURCE: 'Body' DESTINATION: 'Body' ERROR:Body: value not of required type: C:\Users\Sachin Arora\Desktop\BestPractices.txt Dec 21, 2016 at 15:20
  • Try removing the URL from your CSV file. That's something that Salesforce will need to create for you to the document after it saves it for you following the upload. When you use the source destination for the URL, it thinks it doesn't need to save the document to the server. It's akin to doing an upsert.
    – crmprogdev
    Dec 21, 2016 at 15:25

You must log in to answer this question.

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