Timeline for LWC - lighting-datatable - how to display Vendor_Name__r.Name in Vendor column
Current License: CC BY-SA 4.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 18, 2023 at 15:27 | comment | added | Renato Oliveira | That's another approach, but ideally you shouldn't need to edit the back end for this. This adds some overhead and makes the method invocation slower, plus this wrapper class might not have the same schema you might need in a different component that uses the same method/query. Which is why handling this kind of operation is better done in the front end (or at least implement this in a controller that calls a selector class that is common to other classes). | |
Jan 18, 2023 at 3:55 | comment | added | Ryan McNeely | I was able to flatter the referenced colums with a wrapper class in my Apex. | |
Jan 18, 2023 at 3:43 | comment | added | Ryan McNeely | Thanks Renato. Not sure why recursion would be needed. Also, I'm ok at js, not great, so the syntax was a bit confusing. | |
Jan 18, 2023 at 3:09 | comment | added | sfdcfox♦ | I have such a recursive function that I posted here. I use it so frequently it's one of the first methods I put into any project when I decide I might need nested object access. | |
Jan 18, 2023 at 1:32 | history | answered | Renato Oliveira | CC BY-SA 4.0 |