0

I have retrieved the metadata from sandbox to deploy it to the higher org using ANT. ANT have created folders for all the components like objects, classes, etc. But, it did not retrieved many records which are useful for configuration purposes like custom settings records(it have retrieved metadata for custom settings but not the records), remote site settings, etc.

So, I want to know what are other components like custom settings records which are not retrieved using ANT but are necessary?

Also, in my sandbox org, there are many custom settings and each have multiple records. So, I came to know that you need some post deployment steps which include exporting custom settings records from sandbox org and deploying it to higher org.

So, is there any way to export or download or view each records from every custom settings without querying them individually. I have tried a chrome extension called Custom settings exporter for Salesforce. But, if we have many custom settings, it only downloads some of them, it did not work for me. Any custom sfdx plugins or any other reliable tool will be helpful. Thanks!

1

It can be a bit confusing understanding the fine line between what is data and what is meta-data. In your specific example, custom settings have a database structure (that is the meta-data), and then have records which are seen as data and not meta-data. Therefore if you want to transfer custom settings you have to:

  1. export the meta-data
  2. export the actual data in those custom settings (it is a regular SObject in Salesforce that you can query out to a CSV file for example).

(As a general rule - if it's an SObject then it's considered data, if it isn't, it's probably meta-data)

Ok so now you want a way to retrieve all custom setting records without querying individually.

You could script something that retrieves all custom settings Object names (and fields), then constructs SOQL queries to retrieve the data itself.

Alternatively you will have to use a Salesforce deployment 3rd party tool. For example you could use something like Copado which definitely allows you to (declaratively) select and transport the custom settings and it's data records across. I believe Gearset also has a similar feature. (In fact most 3rd party deployment tools with have something like this)

3
  • Yes, I want to retrieve all custom setting records without querying them individually. I understand there are 3rd party deployment tools, but do you know any, which is free? Also, can you help me with the script?
    – Rahul
    Nov 13 '20 at 19:49
  • sfdx and dataloader are free tools that you can use.
    – manjit5190
    Nov 16 '20 at 16:30
  • That's correct - SFDX and dataloader are free to use (I can't really speak to 3rd party tools - most of them have a free to use limited version - most are licensed). with dataloader you simply select the custom setting you are trying to export, with SFDX it would be simply running a SOQL query against that custom setting (as if it were a normal Object). Scripting then is just about automating - and it really depends on what you are using to script (shell scripts, Jenkins, powershell, etc. etc.) Nov 18 '20 at 10:22

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.