-
-
Save arun12209/b2c759b4c44de52bade638127ed1bd9e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { wire } from 'lwc'; | |
import { getRecord } from 'lightning/uiRecordApi'; | |
export default class MyComponent extends LightningElement { | |
@api recordId; | |
@track error; | |
@wire(getRecord, { recordId: '$recordId', fields: ['Account.Name'] }, { | |
error: this.handleError | |
}) | |
account; | |
handleError(error) { | |
this.error = error; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment