You need to sign in to do that
Don't have an account?
Ertyq Mrsk
Error Displaying When Clicking Custom Cancel Button in Salesforce LWC
In my LWC page, I created an Update form with both Update and Cancel buttons. This cancel button should redirect the user to the current record's detail page.
Update button works well and redirects back to the updated record detail page. But on cancel button, it navigates to a page displaying an error message:
Following is the javascript portion of cancel function:
Update button works well and redirects back to the updated record detail page. But on cancel button, it navigates to a page displaying an error message:
Following is the javascript portion of cancel function:
cancel() { this[NavigationMixin.Navigate]({ type: "standard__objectPage", attributes: { recordId: this.recordId, objectApiName: "Account", actionName: "view" } }); }How can I fix this?
Let me know if this helps. If it does, please close this query by marking it as solved so that it may help others in the community. Thank You!
All Answers
Let me know if this helps. If it does, please close this query by marking it as solved so that it may help others in the community. Thank You!