import { LightningElement, wire } from 'lwc'; import { NavigationMixin } from 'lightning/navigation'; navigateToContact() { this[NavigationMixin.Navigate]({ type: 'standard__recordPage', attributes: { recordId: this.contact.data.Id, objectApiName: 'Contact', actionName: 'view' //to edit change value to edit } }); }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter