0

I need all the data backup storage on a regular basis on Salesforce to local database, so I wrote a program that calls the REST API /services/data/v53.0/sobjects access to all the sobjects, Then respectively according to their name call /services/data/v53.0 sobjects/XXX/describegot fields for each object, but I found that the fields I got did not match the fields in the object manager.

I've also tried using SOQL directly:

SELECT EntityDefinition.QualifiedApiName, QualifiedApiName, DataType

FROM FieldDefinition

WHERE EntityDefinition.QualifiedApiName = 'xxx'

But it still doesn't work, if I need to back up the CRM data to my own local database, what do I need to do? How do I get all the tables and all the fields and export them?

please help me!

Heidi
  • 1
  • 1

1 Answers1

0

There are a few ways to do this, but none of them are easy. In the past I have used addons that connect directly to Salesforce via MSSQL. One such application is purpose built for this use case. Its called DBamp. Unfortunately it is rather pricy. You can also connect to your Salesforce instance with integration software like Jitterbit, Mulesoft, DellBoomi or Talend. That approach would require creating an integration catered to the object you want the backup for.

On free side, you could use Excel to connect to your Salesforce instance and pull down whatever object you want, this is probably not an ideal solution though. Data Tab > Get Data > From Online Service > From Salesforce Object.

enter image description here

I have seen other solution like creating full copy sandboxes every week. The last option is connecting MSSQL to Salesforce via SSIS and an ODBC connector but this has been a pretty bad experience in the past, could just be me though.

  • Some additional info, sObject/describe will return the object metadata only (No record data). The data returned are API names not field labels. Try using workbench to explore the REST API for your Org, very handy tool. https://workbench.developerforce.com/login.php – Jamison Ponko Dec 08 '21 at 16:26
  • Many thanks! Last night seems to have solved this problem by setting the field level security for the corresponding field in object Manager. I can retrieve the field by calling sObject/ Describe after checking "Visible". I'm not sure this was the right solution, but at least it worked. Since I need to use a Java program to control its periodic pull-down update process, I may still need to call the interface or execute SOQL. – Heidi Dec 09 '21 at 01:40