Posts

Showing posts from March 26, 2019

Is it not possible to get a parent field in a datatable column specification, for a Lightning Web Component?

Image
5 1 Working with a prototype of a lightning web component, I get that the datatable, just like its Aura brother, needs the columns to be manually specified. That being said, I have the following specification for a datatable that receives pricebook entries: const columns = [ { label: 'Name', fieldName: 'Product2.Name' } ] The names do not display on the component, but if I use a forEach to list the data retrieved by the component, I get the products names, like in: connectedCallback() { getProducts({ pricebookId: this.pricebookId, countLimit: 4 }) .then(result => { this.products = result this.products.forEach(p => { console.log(p.Product2) // Proxy {} object is displayed console.log(p.Product2.Name) // Th