You need to sign in to do that
Don't have an account?

How do you get LWC to recognize compound fields? (rstk__poline_ordno__r.Name)
How do you get LWC to recognize compound fields? (rstk__poline_ordno__r.Name)
LWC does not appear to recognize compound fields names.
LWC does not appear to recognize compound fields names.
Example:
@track columns = [
{
label: 'Name',
fieldName: 'AccountName',
type: 'text',
sortable: true
},
{
label: 'AccountId',
fieldName: 'AccountId',
type: 'text',
sortable: true
},
{
label: 'Id',
fieldName: 'Id',
type: 'text',
sortable: true
}
];
@wire(retreive, {
id: '$recordId'
}) wireRetreive(value) {
if (value.error) {
this.error = value.error;
} else if (value.data) {
let tempData = [];
for (const iterator of value.data) {
tempData.push( {Id: iterator.Id, AccountName: iterator.Account.Name,
AccountId: iterator.Name });
}
this.something = value.data[0].Account.Name;
this.data = tempData;
}
}
}
All Answers
Opportunity[0].OpportunityLineItems[0].Product2.Serial_Number__c
Example:
@track columns = [
{
label: 'Name',
fieldName: 'AccountName',
type: 'text',
sortable: true
},
{
label: 'AccountId',
fieldName: 'AccountId',
type: 'text',
sortable: true
},
{
label: 'Id',
fieldName: 'Id',
type: 'text',
sortable: true
}
];
@wire(retreive, {
id: '$recordId'
}) wireRetreive(value) {
if (value.error) {
this.error = value.error;
} else if (value.data) {
let tempData = [];
for (const iterator of value.data) {
tempData.push( {Id: iterator.Id, AccountName: iterator.Account.Name,
AccountId: iterator.Name });
}
this.something = value.data[0].Account.Name;
this.data = tempData;
}
}
}