function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
iswarya sekar 7iswarya sekar 7 

How to export data from all objects using apex and save it in a folder?

SandhyaSandhya (Salesforce Developers) 
Hi,

I would suggest you below blog which has the sample code for the same.

https://douglascayers.com/2016/03/20/salesforce-easy-ways-to-export-data-as-csv/
 
Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
 
Best Regards
Sandhya
 
iswarya sekar 7iswarya sekar 7
Hi Sandhya,

I saw this post. but I want to export all data from Salesforce in CSV format and it should be stored in a folder.
ashishashish
this is possible through Eclipse
iswarya sekar 7iswarya sekar 7
But I want this to be done using Apex.
DreamsMatterDreamsMatter
Is there a reason you only want Apex solutions? What is the end goal? Are you wanting a full back up of your org in CSV? There are other options that are very powerful. I would recommend DemandTools (paid) or Jitterbit (free) for CSVs. Or if you are flexible and can use a database back up of your org, CopyStorm from CapStorm.

I think Sandhya actually provided a great link for your specific question. See point #7. It doesn't provide a full solution but gives building blocks.