You need to sign in to do that
Don't have an account?
sai teja 69
how to open an LWC compenent on button click on another lwc component?
I need to open LWC component when i click on "Edit" button on another LWC component. I have one LWC component with some buttons on case detail page. When i click on the edit button an another edit lwc component should be open with the same record id context.
I have wrote this below function on 'Edit' button onclick LWC. In url it is coming as "lightning/cmp/c%3AEditCaseButtonOverride" and error This page isn't available in Salesforce Lightning Experience or mobile app.
I have wrote this below function on 'Edit' button onclick LWC. In url it is coming as "lightning/cmp/c%3AEditCaseButtonOverride" and error This page isn't available in Salesforce Lightning Experience or mobile app.
navigateToEditComponent() { this[NavigationMixin.Navigate]({ "type": "standard__component", "attributes": { componentName: "c:EditCaseButtonOverride", recordId :this.recordId } }); }
Ravi Dutt Sharma
In LWC, there is no equivalent of $A.createComponent which is present in Aura. The possible solution to your case is to create branches on the template and only load them when a certain condition is meet.