1import{LightningElement, wire}from 'lwc';2import{getRecord, notifyRecordUpdateAvailable}from 'lightning/uiRecordApi';3import apexUpdateRecord from '@salesforce/apex/Controller.apexUpdateRecord';45export default class Example extends LightningElement{6 @api recordId;78 // Wire a record9 @wire(getRecord, {recordId: '$recordId', fields: ... })10 record;1112 async handler(){13 // Do something before the record is updated14 showSpinner();1516 // Update the record via Apex17 await apexUpdateRecord(this.recordId);1819 // Notify LDS that you've changed the record outside its mechanisms20 // Await the Promise object returned by notifyRecordUpdateAvailable()21 await notifyRecordUpdateAvailable([{recordId: this.recordId}]);22 hideSpinner();23}24}