Skip to main content

Posts

Showing posts from July, 2022

How to map relationship query results to Lighting Data Table ?

We can not straight forward map relationship filed from apex to LWC data table. When we get query results related object information comes  as different object itself. So we need to traverse the query results and map the way we want to. Hers is your controller method @AuraEnabled (cacheable= true )      public   static   List < Associated_Healthcare_Center__c > getAssociatedFacility( Id  sLeadId, Id  sAccountId){              return  [ SELECT  id, Signature_Healthcare_Center__c , Signature_Healthcare_Center__r .phone__c,                   Signature_Healthcare_Center__r . Facility_Short_Name__c ,                   Signature_Healthcare_Center__r . Admission_Director__r . Name     ...