1

I'm thinking of having something in Classic that both switches to Lightning and starts in a specific Lightning App. Perhaps all that is needed is an official, documented API that does the equivalent of what the "Switch to Lightning Experience" link does:

<a href="javascript:sfdcPage.handleSwitchToLightningClick(%27LightningExperiencePreferred%27,true,%27/ltng/switcher?destination=lex-campaign%27);" class="switch-to-lightning"><svg>...</svg>Switch to Lightning Experience</a>

with the Lightning App pre-selected as the default.

Is a URL link sufficient to switch e.g. from Classic:

https://java-drive-8200-dev-ed.cs18.my.salesforce.com

to Lightning:

https://java-drive-8200-dev-ed.lightning.force.com
3

1 Answer 1

3

Using lightning.force.com/lightning in a URL link should be enough to have the user's page opened in Lightning Experience (LEX).

In terms of opening a specific app, there's two ways that you can see mentioned in the PageReference Types doc under "App".

App that you’re navigating to. Pass either the appId or appDeveloperName to the appTarget.

The appId is the DurableId field on the AppDefinition object.

To form the appDeveloperName value, concatenate the app’s namespace with the developer name. To find the app’s developer name, navigate to the App Manager in Setup and look in the Developer Name column.

For standard apps, the namespace is standard__. For custom apps, it’s c__. For managed packages, it’s the namespace registered for the package.

  1. appId is the DurableId of the AppDefinition you're interested in which makes the following link:

yourDomainName.lightning.force.com/lightning/app/DurableId

  1. DeveloperName which requires adding a prefix depending on if it's a Standard App (standard__), custom (c__), or packaged (namespace).

yourDomainName.lightning.force.com/lightning/app/standard__LightningSales

yourDomainName.lightning.force.com/lightning/app/c__CustomAppName

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .