Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { LightningElement, api, track, wire } from "lwc";
- import { getRecord } from "lightning/uiRecordApi";
- const FIELDS = [
- "Parent__c.Account__r.Name"
- ];
- export default class TestLWC extends LightningElement {
- @api recordId;
- @track record;
- @wire(getRecord, { recordId: "$recordId", fields: FIELDS })
- wiredRecord({ error, data }) {
- if (data) {
- this.record = data;
- this.error = undefined;
- } else if (error) {
- this.error = error;
- this.record = undefined;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement