Salesforce Asked by trebleCode on January 2, 2022
I’ve not found conclusive answers around DX and deploying/retrieving custom settings in a sandbox or production org.
I did see this: DX Orgs and Custom Settings
But that post is over a year old at this point. Haven’t seen anything in the DX release notes about custom settings.
Is this still not possible to deploy or retrieve via the CLI? Is this technically possible otherwise via SOAP? If anyone can share a developer doc illustrating possibilities it would be sincerely appreciated.
TIA!
The custom settings metadata can be retrieved or deployed just like any other metadata.
All you need is name of the custom setting
If you are working in orgs that cannot have source tracking enabled
sfdx force:source:retrieve -m CustomObject:<Customsettingname__c>
If you are using source tracked orgs use
sfdx force:source:pull
If you want data within these custom settings then you can use soql
sfdx force:data:soql:query -q "SELECT Id, Name FROM Customsettingname__c"
You can export the data to the local folder using
sfdx force:data:tree:export -q "SELECT Id, Name FROM Customsettingname__c" -x export-customsetting -d /tmp/sfdx-out -p
And then load the exported custom setting data into a target scratch org with
sfdx force:data:tree:import -p /tmp/sfdx-out/export-customsetting.json
Answered by Mohith Shrivastava on January 2, 2022
13 Asked on January 6, 2022 by vivek-m-chawla
3 Asked on January 6, 2022 by yossi-cadaner
1 Asked on January 6, 2022 by user6366199
0 Asked on January 6, 2022
1 Asked on January 6, 2022 by bergin-panimayam
1 Asked on January 6, 2022 by anthony-williams
3 Asked on January 4, 2022 by brian-miller
1 Asked on January 4, 2022
0 Asked on January 4, 2022 by jason-clark
1 Asked on January 4, 2022 by user85715
0 Asked on January 4, 2022 by tyler-dahle
1 Asked on January 2, 2022 by shivam-shukla
2 Asked on January 2, 2022 by darkskull
1 Asked on January 2, 2022 by alef-ribeiro
2 Asked on January 2, 2022 by snehal
1 Asked on January 2, 2022 by evazi
Get help from others!
Recent Questions
Recent Answers
© 2023 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP