2

I would like to export ContentVersion with real content file. We want to migrate content from Salesforce to another system for a single library.

So, is there any way we can export data for a single library and get the physical file of content?

I am using "Data Export", but as there is no way to filter data in "Data Export", it is exporting all content of org. Which will take lot of time for exporting as well as downloading.

Please suggest, if there is any better way to export "Content" files and metadata by it's library name.

Thanks and Regards,

Ashish Shulka

3

you can try FileExporter app from appexchange.

  • Can you expand the answer a bit? How would it help them? – Kelly J Andrews Feb 24 '15 at 17:42
  • @kellyjandrews check out my answer about Realforce which supports file exports – realfire Sep 24 '17 at 6:00
5

We needed these content to be exported urgently. So, couldn't tried any AppExchange App.

Every salesforce content has it's download URL like : http://Your_ORG_URL/sfc/servlet.shepherd/version/download/?asPdf=false"

We logged into one browser and wrote a automation script to download these files by it's URL.

It was quite fast.

  • What script was it written in? Could you share the details so as it may help people here. – orangeguy May 18 '16 at 19:16
  • 1
    @Mr.Orange, we used Selenium IDE Script. It is an firefox addon which takes input from xml with the help of SelBlock addon. SelBlock uses for loop and does the repetitive taks to download file. It is a open source addon which is generally used for automation testing. – Ashish May 19 '16 at 11:55
2

You can create the report for that data you want to export with all the filter criteria you need. And then export that data directly from reports.

2

We use the Salesforce Dataloader for manual queries where we want to select individual fields and then have a weekly download that backs up our entire database in it's current condition.

Backups are accessible from Setup > Administration Setup > Data Management > Data Export and there's some documentation here.

  • Or... for even more fine grain control you can experiment with an SOQL query via the Salesforce workbench and then issue an API request? – Huw Feb 24 '15 at 12:17
  • Are you able to export document files for content by using "Dataloader" 's export option? I am able to export all metadata of content version by using Dataloader. But my problem is with the documents (.docs, .pdf, etc) uploaded in these content versions. – Ashish Feb 24 '15 at 14:29
  • Humm i'm afraid I don't know there... I've never tried it. The closest I've seen is work that i've done using Ruby on Rails with the excellent restforce gem that page has docs on how you could tune it to download files... but perhaps that's slightly over-engineering the problem? – Huw Feb 24 '15 at 23:51
1

I recently coded a Visualforce page to do this using some URL hacking.

Basically, you'll use the URL:

http://Your_ORG_URL/sfc/servlet.shepherd/version/download/

And append the ID's of all the ContentDocument.LatestPublishedVersionId's to the end of the URL separated by "/". So, it'd look something like:

http://Your_ORG_URL/sfc/servlet.shepherd/version/download/id/id/id/id

I had to use %2F in my code instead of "/" in order for the mass download via button to work.

0

Disclaimer: I'm from the product team

Datasert Realforce has support for exporting files from Documents, ContentVersion, Attachments and pretty much any base64 fields.

  • It is query based export so you can specify the predicates to limit rows to your needs
  • For documents, it also supports exporting into the appropriate folders as maintained in Salesforce
  • It discovers the file name extensions, if file names doesn't end with appropriate one. For ex., if attachment content type if application/pdf but if file name doesn't end with .pdf then it adds .pdf extn.

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.