Salesforce, Python, SQL, & other ways to put your data where you need it

Need event music? 🎸

Live and recorded jazz, pop, and meditative music for your virtual conference / Zoom wedding / yoga class / private party with quality sound and a smooth technical experience

Open a Salesforce scratch org in a different browser with CumulusCI

10 Jul 2021 🔖 salesforce
💬 EN

Using Salesforce’s CumulusCI to manage SFDX scratch orgs? I am. I was working from a machine where Firefox is the default web browser, and Firefox didn’t play nicely with Lightning-mode editing of custom metadata types (it wouldn’t ever render the main part of the page where I edit types). Nor would Firefox let me switch to Classic mode (it kept logging me out of the scratch org). This is how I managed to open the scratch org in Chrome.

This was the command I had been using to open a scratch org called dev from within a VSCode command prompt whose base folder was a codebase already configured to work with scratch orgs from a given real “hub” org:

cci org browser --org dev

Luckily, it came with --help instructions at the command line that were useful:

> cci org browser --help

Usage: cci org browser [OPTIONS] [ORGNAME]

  Opens a browser window and logs into the org using the stored OAuth
  credentials

Options:
  --org TEXT       Alternate way to specify the target org. By default, runs
                   against the current default org.

  -p, --path TEXT  Navigate to the specified page after logging in.
  -r, --url-only   Display the target URL, but don't open a browser.
  --help           Show this message and exit.

So next, I tried:

cci org browser --org dev --url-only

It displayed a URL that, sure enough, I could copy, paste into Chrome, and log into this scratch org with.

Much better – now I can see the body of https://my-dev-scratch-org.lightning.force.com/lightning/setup/CustomMetadata/home.

Tip: Ctrl+Click on the link makes VSCode give me an option to copy rather than open. This saves me from having to carefully select the URL from beginning to end.

--- ---