1

Is it possible for a SQL database to be consumed from Salesforce? What happens is that account records are loaded into the SQL database and a code is generated, so what I am looking for is that every month Salesforce consult this database to verify that these accounts exist in Salesforce and if not then create or update these records in Salesforce.

It would be that from time to time Salesforce consults the database that is in Salesforce to obtain the accounts and create them in Salesforce.

Is it possible to get to this using apex?

Stephen Ostermiller
  • 23,933
  • 14
  • 88
  • 109

1 Answers1

0

From salesforce you cannot access different database. You need to have a Web Api on another application that can access the targeted database, From your Apex Code you can do callout to invoke that Web API.

If it is one time purpose. Better you just do the data extraction into CSV and Export the data from Salesforce as well. Doing any clean up and transformation required. Use data loader, data import wizard or any other method to reimport that data into Salesforce.

mokh223
  • 544
  • 3
  • 5
  • 14