1

I have an LWC component which i am rendering in the utility bar in my lightening app.

In that component, i want to disable the pop-out option of the utility bar popup using javascript based on some user action.

I saw that in aura components i can use disableUtilityPopOut controller function to disable the popup functionality.

How can i achieve the same in my LWC component. is there any way to do that? Please help.

1 Answer 1

1

Salesforce Console APIs (Navigation Item API, Workspace API, Utility Bar API) are not supported in LWC. To make it work in LWC, you can go with this approach:-

Use Lightning Message Service along with two separate components(An Aura Component and a Lightning Web Component). Aura Component will be used as a service component to provide Salesforce Console APIs (Navigation Item API, Workspace API, Utility Bar API) features to Lightning Web Component. The Lightning Web Component and Aura Component will be communicating with the help of Lightning Message Service.

Checkout a working example here:- SALESFORCE CONSOLE APIS (NAVIGATION ITEM API, WORKSPACE API, UTILITY BAR API) IN LIGHTNING WEB COMPONENT USING AURA AND LIGHTNING MESSAGE CHANNEL

enter image description here

You must log in to answer this question.

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