use navigation mixing
1)Add library
import { NavigationMixin } from 'lightning/navigation';
2)add navigation mixing in default class
export default class ObservationCreationPage extends NavigationMixin(LightningElement) {
3)add navigation mixing in function
handleSuccess(event) {
this.loaded = true;
this.closeQuickAction()
Successfully!! ${event.detail.id}`, "success")
console.log("handle Success",JSON.stringify(event.detail))
this.showToast("Success!!", `Observation Created Successfully!! Obs No.: ${event.detail.fields.Name.value}`, "success")
this[NavigationMixin.Navigate]({
type: 'standard__recordPage',
attributes: {
recordId: event.detail.id,
actionName: 'view'
}
});
}
Top comments (0)