This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# query the accounts and put them in chatty_accounts_to_move__backup.csv | |
soql " | |
select id, name, ownerid, owner.name | |
from account | |
where ownerid = '005j000000Ea93uAAB' | |
" -u dev1 -r csv > chatty_accounts_to_move__backup.csv && | |
# cut out the Id of each account and set the new OwnerId | |
cat chatty_accounts_to_move__backup.csv | \ | |
cut -d "," -f 1 | \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sfdx force:data:bulk:upsert \ | |
--sobjecttype account \ | |
--externalid id \ | |
--csvfile chatty_accounts_to_move.csv \ | |
--targetusername dev1 \ | |
--wait 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
soql " | |
select id, name, ownerid, owner.name | |
from account | |
where ownerid = '005j000000Ea93uAAB' | |
" -u dev1 -r csv > chatty_accounts_to_move.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
soql "select id, username from user where firstname = 'chatty'" -u dev1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This will open a login page that will let you connect your org to the CLI | |
sfdx force:auth:web:login --setalias HelloWorldOrg | |
# You will now see the org you connected with! | |
sfdx force:org:list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT Id, Name, (SELECT Id, Name, Amount, CloseDate FROM Opportunities) | |
FROM Account | |
WHERE Id IN (SELECT AccountId FROM Opportunity) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT Id, Name, (SELECT Id, Name, Amount, CloseDate FROM Opportunities) | |
FROM Account |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT Id, FirstName, LastName, Title, Account.Name | |
FROM Contact | |
WHERE Title = 'CEO' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT Id, Company, LeadSource, format(CreatedDate) | |
FROM Lead | |
ORDER BY CreatedDate | |
LIMIT 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT Id, Name, BillingState | |
FROM Account | |
WHERE BillingState IN ('CA', 'NY', 'FL') | |
LIMIT 10 |
NewerOlder