1

I have 3 lightning apps in my system named 'AppA, AppB, AppC'. And I've created 3 home pages using lightning app builder. Now I want to generate a URL link and on clicking that should redirect to that specific app's home page. For eg, on clicking the link, it should redirect me to the AppA's home page. From AppMenuItem object, I've taken the startURL and tried with that. But it's redirecting to the classic page. I'm not sure how to generate the same for lightning experience. Anyone with any idea, please let me know. Thanks in advance.

0

You will need a simple lightning component with a link and action like below

appNav.html

<template>
   <lightning-button variant="brand" label="App A" title="App A" onclick={navigateApp}></lightning-button>
</template>

Controller code

appNav.js

import { LightningElement} from 'lwc';
import { NavigationMixin } from 'lightning/navigation';

export default class AppNav extends NavigationMixin(LightningElement) {

navigateApp() {
    this[NavigationMixin.Navigate]({
        type: 'c__app',
        attributes: {
            apiName: <appDeveloperName>,
        }
      });
     }
 }

appDeveloperName is the developer name of your app.

Note the URL format would be as below /lightning/app/c__<appdeveloperName>

2
  • Is it possible to redirect the specific home page from Email Template?
    – sfdc1100
    May 26 at 6:05
  • Yes I have specified what the final url looks like in the answer! You can use that May 26 at 12:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.