官术网_书友最值得收藏!

Exporting data

In the previous section, we saw that we can export data from Salesforce in the following ways:

  • Reports: By exporting resulting datasets in CSV (or Excel) format
  • Data Loader: By using a SOQL query to get a CSV file that contains the results
You can use other tools or even build your own using the SOAP and REST APIs in order to run SOQL and SOSL queries. You can even use Chrome extensions to do this job on the fly (a full list of Chrome extensions, by Salesforce MVP Jitendra Zaa, can be found at https://www.jitendrazaa.com/blog/salesforce/top-google-chrome-extensions-for-salesforce/).

Salesforce CRM comes with a backup tool that you can leverage to export data from your organization in CSV format, back it up, and so on. This feature is called Data Export and can be found by going to Setup | Data | Data Export.

The tool allows you to do a one-time data export, though it can be scheduled on a weekly or monthly basis, depending on your Salesforce edition (only Enterprise, Performance, and Unlimited deliver the weekly option).

Click on the Export Now button to get to the following page:

From here, do the following:

  1. Choose file encoding.
  2. Check the Include images, documents, and attachments and Include Salesforce Files and Salesforce CRM Content document versions checkboxes, which will create bigger files and increase the export time, respectively.
  3. Check the Replace carriage returns with spaces box if you want to replace carriage returns/line breaks with a single space (this is useful for certain kinds of integration formats).
  4. Select the kind of data you want to export. By selecting Include all data, you are, as the option suggests, including every Salesforce object.
The kind of objects that are exported depends on the time you create the export job, so if you are creating weekly/monthly export jobs and you create a new object after their creation, remember to update the export job by selecting Include all data.

When you hit the Start Export button a job is enqueued and, as usual, Salesforce sends a notification email when the export job has completed:

Scheduled Data Export has a similar configuration, except for the scheduled time frame:

Because jobs are run according to the platform's load, sometimes, export results won't appear on the day the scheduled configuration has specified. If this happens, the job will be scheduled 7 or 29 days after the last executed job (7 for a weekly schedule, 29 for a monthly schedule).

The exported data is saved into a ZIP file that contains all the CSV files for the objects that were exported that are up to 512 MB in size. If the data you've exported is bigger than this, more ZIP files will be created.

You cannot make subsequent executions of Export Now jobs; you have to wait for the minimum time frame allowed for your organization (7 or 29 days). The exported files are available for 48 hours after their creation, after which the files are automatically deleted.
主站蜘蛛池模板: 分宜县| 博野县| 饶河县| 道孚县| 贵定县| 洱源县| 泸定县| 昆山市| SHOW| 中西区| 海晏县| 兴安县| 永顺县| 邵阳县| 云梦县| 银川市| 广饶县| 华宁县| 苏尼特右旗| 柯坪县| 容城县| 上虞市| 江陵县| 滕州市| 隆子县| 册亨县| 青川县| 渑池县| 大同县| 建水县| 齐齐哈尔市| 鄯善县| 招远市| 沅江市| 峨山| 延川县| 张北县| 芜湖市| 连山| 德庆县| 阿图什市|