I'm working on a requirement where I want a button which will open a modal to create a new Task record in LWC. For this, I tried using NavigationMixin. But onclick of Save in the modal, it redirects to the newly created record page instead of closing the modal. Is there any way to skip the navigation to the newly created record and close the modal only.
Below is the code of NavigationMixin that I'm using:
this[NavigationMixin.Navigate]({
type: 'standard__objectPage',
attributes: {
objectApiName: 'Task',
actionName: 'new'
}
});
Thanks in advance.