Tag: sfdx

  • Reading Time: < 1 minutes

    You are trying to log in through an instance URL (example: sandbox) and you do this.

    sfdx auth:web:login -a myusername@myorg.sandbox --instanceurl=https://mysandbox-domain.lightning.force.com

    And you get this error in console:

    In your browser you get this


    The problem is you are using lightning.force.com domain instead of my.salesforce.com

    sfdx auth:web:login -a myusername@myorg.sandbox --instanceurl=https://mysandbox-domain.my.salesforce.com

  • Reading Time: < 1 minutes

    cd some/directory
    sfdx auth:web:login -a my@username.dev --instanceurl=https://my-sfdc-instance.my.salesforce.com
    sfdx force:project:create -n myProject --manifest
    cd myProject
    sfdx config:set defaultusername=my@username.dev
    # Modify the package xml to retieve whatever we want
    sfdx force:source:retrieve -x manifest/package.xml
    # or retrieve this way
    sfdx force:source:retrieve -m "ApexClass:MyApexClass"

    Photo by Cookie the Pom on Unsplash

  • %d bloggers like this: