sfdx force:apex:log:list --json
sfdx force:apex:log:list --json > ".sfdx\tools\debug\logs\listLogs.json"
sfdx force:apex:log:get -d ".sfdx\tools\debug\logs" -i <jobid>
sfdx force:apex:log:get -n number_of_last -d .sfdx/tools/debug/logs
sfdx force:apex:class:create -n MyClass -d ".\force-app\main\default\classes"
sfdx force:apex:test:run --classnames "class1,class2" -c -r human
sfdx force:apex:test:run -t "myClassTest.myMethodTest" -c -r human -d .sfdx\tools\testresults\apex --json
sfdx auth:web:login -a <alias> -r <https://test.salesforce.com>
sfdx auth:web:login -a <orgName>
sfdx force:config:set defaultusername=<orgName>
sfdx force:source:deploy -p ".\force-app\main\default\lwc\myComponent"
sfdx force:org:delete -u MyOrg
sfdx force:lightning:component:create -n MySection -d ".\force-app\main\default\lwc" --type lwc
sfdx force:data:soql:query -t -q "SELECT ID FROM DEBUGLEVEL WHERE DEVELOPERNAME = '<ApexDebugger|SFDC_DevConsole|Finest>'"
Finest
- Mais detalhes
SFDC_DevConsole
- Padrão VSCode
Salve o Id retornado
sfdx force:data:soql:query -q "SELECT id FROM USER where username = '[email protected]'"
sfdx force:data:record:create -t -s TraceFlag -v "DebugLevelId=<debugLeveId> StartDate=2022-04-08T00:26:04.000-0300 ExpirationDate=2022-04-08T00:26:04.000-0300 LogType=<CLASS_TRACING|DEVELOPER_LOG|USER_DEBUG> TracedEntityId=<userid>"
sfdx force:data:soql:query -t -q "select id from TraceFlag where TracedEntityId = '<userID>'"
Ou por username
sfdx force:data:soql:query -t -q "select id from TraceFlag where TracedEntity.username = '<[email protected]>'"
sfdx force:data:record:update -t -s TraceFlag -i <trace_flag_id> -v "ExpirationDate=2017-12-01T00:58:04.000-0300"
sfdx force:mdapi:retrieve -k ./metadata/package.xml -r ./metadata/sourceOrg --unzip -u sourceOrg
mv ./metadata/sourceOrg/unpackaged/unpackaged/* ./metadata/sourceOrg/
rm ./metadata/sourceOrg/unpackaged -R
rm ./metadata/sourceOrg/unpackaged.zip
sfdx force:mdapi:retrieve -k ./metadata/package.xml -r ./metadata/targetOrg --unzip -u targetOrg
mv ./metadata/targetOrg/unpackaged/unpackaged/* ./metadata/targetOrg/
rm ./metadata/targetOrg/unpackaged -R
rm ./metadata/targetOrg/unpackaged.zip
git checkout -b tmp_merge_branch
mkdir mergeFolder
cp ./metadata/targetOrg/* .\mergeFolder\ -r
git add mergeFolder
git commit -m 'retrieved'
cp ./metadata/sourceOrg/* .\mergeFolder\ -r -Force
git commit -m 'merged'
sfdx force:mdapi:deploy -d .\mergeFolder -u targetOrg <-l RunLocalTests>
git checkout branch_original
git branch -D tmp_merge_branch
sfdx force:source:retrieve -x ./metadata/package.xml -u targetOrg