We use a homebrew ERP system based on MySQL & Perl.

In Salesforce accounts we need some picklists to select values from specific MySQL tables (only reading from external system is required). New values will be added to required tables every few days, Salesforce accounts will be edited each day.

My first idea was to create a new custom object for each MySQL table which contains the value and its MySQL Id. A new lookup field would be added to account. And each time values change in our system a script using the API synchronizes tables with custom objects.

I read documentation about external data sources and objects: https://help.salesforce.com/articleView?id=external_data_sources.htm&type=5 https://help.salesforce.com/articleView?id=000329420&type=1&mode=1

But I don't see a way to let Salesforce read my MySQL tables, generate related objects and repeat that when data changes. So is there an easier solution than my one?



Your first approach is the easier one and it's the usual solution to this type of problem. Don't need to do a whole lot of hand-coding. In addition to out of the box SF tools such as Data Loader there are a number of free 3rd party apps listed in AppExchange that can help you or you can look at free-ish popular options such as dataloader.io or Jitterbit data loader

External objects in Salesforce require an OData interface to the external data source. MySQL does not natively support OData, you need OData-speaking middleware that sits between SF and MySQL. There are commercial and OSS oData providers/libraries that help with this. If you plan on doing a lot more interfacing with your homegrown ERP system, this approach might be worth it in a long run...but for a simple picklist sync, it's likely an overkill.

| improve this answer | |
  • 1
    Should be noted - external objects are also a paid option, and it isn't cheap. Looks like it was made for more mid-sized or enterprise customers that wanted their external tables to show up and act like regular Salesforce objects – Brian Miller Jul 24 '19 at 20:58

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.