6

I have a custom setting and this has some records in it. How can we move these records? Would custom settings be also available in apex data loader?

Thanks

  • All Custom Settings are available for export/import via data loader. You can query and export them just as you would a Standard or Custom Object. – zachelrath Sep 27 '12 at 16:17
8

You could certainly be able to extract and insert your custom settings via the data webservice APIs and also via the Apex data loader.

Another often seen practice is to have an Apex code snippet or maybe even Apex method which can be called to setup custom settings and perhaps some minimal test data. This Apex snippet or method can then be executed via the dev console to speed up preparation of fresh dev and config only sandboxes. This is often a faster and safer workflow than doing the export-->import of custom settings.

| improve this answer | |
  • Rather than creating apex class and having to add test coverage etc, the migration planning process might include step to serialize custom settings to a JSON string, then execute a simple method via anonymous apex window (cut and paste from a ready to go text file) to re-inject settings into the new org. I do this. Saves loads of effort and adds no apex to org. One text file to inject lists of settings to three different targets in my current project. – CloudHugger Mar 6 '14 at 1:37
  • I understand in dev console i get the results by query. But how do Iinsert them back in different organization? – sfdcFanBoy Feb 5 '15 at 8:36
3

Use dataloader to extract the records and then use dataloader to insert into prod instance

| improve this answer | |
2

Custom settings are visible in apex data loader as normal objects. We can use dataloader to export the data from the dev env and insert it into prod env.

| improve this answer | |
1

To make your task easy, you could use the "Custom Settings Exporter" chrome extension. It extracts all the custom settings from your org into an excel. This excel could then be loaded via dataloader (you might have to save each sheet as csv)

https://chrome.google.com/webstore/detail/custom-settings-exporter/lmfmdaidklofmhheadbjcgcdeidnhbil?hl=en-US

| improve this answer | |

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.