You need to sign in to do that
Don't have an account?
ScottB3
Can a Lightning Web Component know if it is in a Standard or Console App
I am trying to create a LWC that is aware of whether or not the App it is embedded in is uses Console or Stanadard navigation style.
I need this because I have two separate apps using the same component, one for fully licensed users and another for those only with Company Community.
If console, I need to use Navigation.Mixin, for Standard, I just open a new window.
I've tried calling UserInfo.getUiThemeDisplayed() but I just get Theme4d returned regardless of which app I'm using.
I need this because I have two separate apps using the same component, one for fully licensed users and another for those only with Company Community.
If console, I need to use Navigation.Mixin, for Standard, I just open a new window.
I've tried calling UserInfo.getUiThemeDisplayed() but I just get Theme4d returned regardless of which app I'm using.
Greetings to you!
Lightning Web Components doesn’t currently support Salesforce Console (Navigation Item API, Workspace API, UtilityBar API). To use a Lightning web component with Salesforce Console, wrap the component in an Aura component.
https://developer.salesforce.com/docs/component-library/documentation/lwc/lwc.get_started_supported_experiences
Please refer to the below link (check crmprogdev's answer) which might help you further.
https://salesforce.stackexchange.com/questions/263483/can-a-lightning-web-component-know-the-difference-between-console-and-standard-v
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
The NavType returns either "Standard" or "Console" Based on the application that the user is currently in.
Here's a link to the Object Definition for AppDefinition: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_appdefinition.htm
Hope this helps.
Best,
Jason Snyder