Wednesday 4 May 2022

How to navigate to Standard Edit record page LWC

 Hi,

The following code snippet helps to navigate to the Standard edit record page.


Code Snippet:

 this[NavigationMixin.Navigate]({            

                        type: 'standard__recordPage',

                        attributes: {

                            recordId: this.recordId,

                            objectApiName: 'Account',

                            actionName: 'edit',        

                        },

        

                        state: {

                            nooverride: 1,

                            backgroundContext: '/lightning/r/Account/' + this.recordid + '/view'        

        

                        }

        

                    });

                    eval("$A.get('e.force:refreshView').fire();");

}


Reference: 

https://developer.salesforce.com/docs/component-library/overview/components


No comments:

Post a Comment

How to include a screen flow in a Lightning Web Component

 Hi, Assume  you have a flow called "Quick Contact Creation" and API Name for the same is "Quick_Contact_Creation". To i...