- edited description
Browser selection
When choosing a connection to open in the toolbar, it would be great if you could choose in which browser the connection should open.
Similar to choosing a browser to preview a visualforce page.
Comments (13)
-
reporter -
repo owner I'll take a look but unfortunately this may be a bit difficult to do consistently, in particular for SFDX-based connections where the CLI is responsible for opening the browser and doesn't allow you to specify a browser to be used.
-
Do you know of the magic of frontdoor.jsp? https://help.salesforce.com/articleView?id=000332032&language=en_US&type=1&mode=1
-
repo owner Xander, that's what I use to open org links for native connections. For CLI connections I have to use the CLI, though, to ensure that the OAuth refresh token is up-to-date.
-
Doesn’t force:org:display refresh the token that it shows?
-
Account Deactivated @Scott Wells can’t you just parse SFDX output and pass it to IDE so it opens URLs in whats configured there?
I know SFDX nows allows to specify browser too, albeit only supports major three and not something like brave.
I was able to configure webstorm to default onto brave. Having full support would make IC2 here even more amazing!
Same issue applies when clicking on record on SOQL results table - it opens my OS default browser, not IDE’s.
-
repo owner Hi. I apologize but I’m a bit confused. Are you asking for IC2 to support opening links in browsers not supported by the CLI for source format/CLI-managed projects? Because it should work with any IDE-configured browser that’s also supported by the CLI’s
force:org:open
command. Or am I misunderstanding the question? -
Account Deactivated Well, I guess yes? Unsure why would source format should matter - my request is to support to whatever is configured at IDE (screenshot below).
FWIW - I have both - sfdx and traditional source formats. My connections are both - oauth and password+token.
Unsure where CLI part comes in but seemingly all windows say “Loading details for Salesforce CLI connection …”
-
repo owner Unfortunately it does matter in terms of having an active session when the browser opens. And I mis-spoke. It’s not about source format vs. metadata format. It’s about native IC2 connections vs. CLI-managed connections. So all source format projects, but also any metadata format projects that use CLI-managed connections.
For native IC2 connections, IC2 is responsible for logging in and getting a session ID via the API, and it can ensure that session token is valid before opening anything in Salesforce that requires it.
For CLI-managed connections, the CLI is responsible for maintaining an active OAuth access token. That’s why IC2 uses
force:org:open
in projects that use those connections. Otherwise you could (and would) end up with a stale access token and the login page would be shown instead.As a result, for projects that use a CLI-managed connection, the only browsers that are supported are those supported by the CLI itself.
Hopefully that helps explain it. Let me know if not.
-
Account Deactivated sfdx force:org:open has an ‘-r’ flag that displays url only + json output - I used to use this in my CI/CD tests to open playwright…
IDK if the IDE has an API to open url tho.
-
repo owner Ah, yes. Big “duh” on my part there! That definitely works. I’ve made the change locally but it’s too late for this week’s release (planned for tomorrow morning) and there won’t be one next week due to my kids' spring break. I’ll include it in the first release after that, though. Thanks for the suggestion!
-
Account Deactivated Amazing, big thanks!
-
repo owner - changed status to resolved
Delivered in 2.2.5.9.
- Log in to comment