I am trying to display a simple data table with Opportunity fields as well as parent fields, however, it seems that there is no (intuitive) way for me to display the parent fields, such as Account.
My query:
select StageName, Account.FirstName from Opportunity limit 3
My datatable JSON:
[
{
"fieldName": "StageName",
"label": "StageName",
"searchable": true,
"sortable": true
},
{
"fieldName": "AccountId",
"label": "AccountId",
"searchable": true,
"sortable": true
},
{
"fieldName": "Id",
"label": "Id",
"searchable": true,
"sortable": true
}
]
So I don't know if it's possible to amend the JSON to display this, but in the declarative DataTable box I cannot see the parent field, i.e. FirstName (yep, person accounts are on)
When I test the SOQL query I get [object Object] as a value in the column which would have to represent the Account FirstName.
Any help would be greatly appreciated!
Regards, Vio