• Nikhil Sharma 219
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hi All,
 
I'm working on a requirement where I want a button that will open a modal to create a new Task record in LWC. For this, I tried using NavigationMixin. But on click 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.
 
#LightningFramework #lightningwebcomponents  #LWC  #Navigationmixin