I have a dev hub trial org where I have created an account record with the name 'Chaser' and it has an Id of '0011N00001Eam4C'
When I run the following command, I receive 'Query Returned No results'
sfdx force:data:tree:export -q "SELECT Name FROM Account WHERE Id = '0011N00001Eam4C'" -u DevHub -d ../sourceData
However, the strange thing is when I query by Name instead like so:
sfdx force:data:tree:export -q "SELECT Name FROM Account WHERE Name = 'Chaser'" -u DevHub -d ../sourceData
A Account.json file is populated with 1 record in the sourceData folder.
Why won't results come back when I query with the Id condition?
Thank you for your help!
0011N00001Eam4CQARthen it would probably explain the issue. – Daniel Ballinger Feb 06 '18 at 19:24SELECT Id, Name FROM Account WHERE Name = 'Chaser'– Daniel Ballinger Feb 06 '18 at 20:37SELECT Id, Name from Account where Id = '0011N00001Eam4C'
I get the message no query results returned. If I go directly into the dev console in the environment I am exporting from, that query above where I specify the id does return 1 record as expected.
– Chase Klingel Feb 06 '18 at 20:49{ "records": [ { "attributes": { "type": "Account", "referenceId": "AccountRef1" }, "Name": "Chaser" } ] }
Does this help at all?
– Chase Klingel Feb 06 '18 at 23:51