0

I have a pice code:

navigateToRecordEditPage(event) {
        this[NavigationMixin.Navigate]({
            type: 'standard__recordPage',
            attributes: {
                recordId: event.target.recordId,
                objectApiName: 'Account',
                actionName: 'edit'
            }
        });
    }

This code opens an edit modal. I want to catch when the user clicks 'save' on this modal. How can I do it?

4
  • Hi, You cannot catch that event, you need to override the edit button for that. Commented Apr 25, 2020 at 13:32
  • so after that, I need to override the edit action and write a modal component it cause more work... Commented Apr 25, 2020 at 14:58
  • What is your requirement exactly? why do you want to catch a save event? Commented Apr 25, 2020 at 16:58
  • because I want to refresh data in component from which I call the method after edit Commented Apr 25, 2020 at 17:46

2 Answers 2

0

So, I figured out it is impossible. If u want to do that you need to override standard edit modal.

1
0

A long workaround however saves some custom dev is using a platform event and then calling your refresh method in there. See this article, also has a link to a fix to the original article LWC - empApi for publishing and subscribing platform event from Lightning web component

1
  • 1
    Welcome to Salesforce SE! While this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
    – identigral
    Commented Jun 6, 2020 at 3:28

You must log in to answer this question.

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