import { LightningElement,track,api } from 'lwc'; import { NavigationMixin } from 'lightning/navigation'; import { ShowToastEvent } from 'lightning/platformShowToastEvent'; export default class NewOrderLWC extends LightningElement(LightningElement) { @track show = false showModal() { this.show = true } Navigate(event) { let recordId = event.detail.id this.openOrder = false this[NavigationMixin.Navigate]({ type: 'standard__recordPage', attributes: { recordId: recordId, objectApiName: 'Opportunity', actionName: 'view', }, }); this.showSuccessNotification('Saved','New opportunity saved','success') } // toast util method showSuccessNotification(_title, _message, _variant) { const evt = new ShowToastEvent({ title: _title, message: _message, variant: _variant, }); this.dispatchEvent(evt); } cancel() { this.show = false } }