This is exactly the same question from here: Programmatic way to switch apps?

However this solution is outdated and not working anymore. Is there any way to switch from the current selected app to another one using Lightning or APEX?

2 Answers 2


Hi you can redirect to the url "/lightning/app/06m2E000000qgp1QAA". The last part is the id of the desired app.

Check the lightning/navigation that can be used both in aura/lwc



  • Thanks for the answer @Willian Matheus. But I'm struggling to get the App's ID. How to get that? Aug 26, 2021 at 13:35
  • 1
    Hi @JulioDidierMaciel try to do a query like these "Select DurableId, Label, MasterLabel, NamespacePrefix, DeveloperName from AppDefinition", the DurableId is the one that you need. Aug 26, 2021 at 14:20

Just found out one example to navigate to a record into another app:



to get current App ID use:

String appId = [SELECT Id, AppDefinitionId FROM UserAppInfo WHERE UserId = :UserInfo.getUserId() LIMIT 1].AppDefinitionId;

You must log in to answer this question.

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