I am running the following sfdx
command to export Accounts, Contacts, and Opportunities. However, I am running into the following error messages below.
Question:
- How can I export the Accounts, Contacts, and Opportunities using
sfdx force:data:tree:export
?
What I tried:
sfdx force:data:tree:export -u myenv -q myfolder/account-query -d myfolder/accounts --prefix data-export --outputdir myfolder/accounts/ --plan
Error message:
Opportunity reference to account (someid) not found in query results
account-query file content
Select Id, Name, myfield__c \
,(Select Id, FirstName, LastName From Contacts) \
,(Select Id, Name From Opportunities where isClosed = false) \
From Account Where myfield__c != null Limit 200
limit 200
down tolimit 50
. Something weird going on where the related objects (have an account id lookup) are not included in the account query doesn't work. Its the only thing I can think of but that didn't make sense to me