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

Admin looking for advice on lightning even handling
Hello,
I made this really simple lightning component simply to have a better layout of the fields than what could be achieved with standard page layouts. All of the fields in it are roll-up summary fields of child objects. The component is going to sit above those child related lists on the page layout.
My challenge is that when those child records are updated the changes are not reflected in the lightning component....have to refresh the page to see them.
So, my question is on event handling. More specifically what event should I be listening for? Is the update to the roll-up summary fields? Is that even possible? If not then I have to listen for the update to the child record. Can I get a little advice on how that is done?
<aura:component implements="flexipage:availableForAllPageTypes,force:hasRecordId" access="global"> <force:recordData recordId="{!v.recordId}" layoutType="FULL" recordUpdated="{!c.itemsChange}"/> <lightning:card> <lightning:recordViewForm recordId="{!v.recordId}" objectApiName="Project__c"> <div class="slds-grid"> <div class="slds-col slds-size_1-of-3"> <div class="demo-only" style="padding: 10px; background: rgb(43,168,166); margin-right: 150px;"> <div class="slds-text-heading_medium slds-text-color_inverse">Estimation for Invoiced</div> </div> <lightning:outputField fieldName="Invoiced_Amount__c" /> <lightning:outputField fieldName="Estimated_Expense_of_Invoiced__c"/> <lightning:outputField fieldName="Estimated_Profit_for_Invoiced__c" /> <lightning:outputField fieldName="Estimated_Margin_for_Invoiced__c" /> </div> <div class="slds-col slds-size_1-of-3"> <div class="demo-only" style="padding: 10px; background: rgb(43,168,166); margin-right: 100px;"> <div class="slds-text-heading_medium slds-text-color_inverse">Estimation for Entire Project</div> </div> <lightning:outputField fieldName="Expected_Invoice_Amount__c" /> <lightning:outputField fieldName="Total_Estimated_Expense__c"/> <lightning:outputField fieldName="Estimated_Total_Profit__c" /> <lightning:outputField fieldName="Estimated_Total_Margin__c" /> </div> <div class="slds-col slds-size_1-of-3"> <div class="demo-only" style="padding: 10px; background: rgb(43,168,166); margin-right: 150px;"> <div class="slds-text-heading_medium slds-text-color_inverse">Actual</div> </div> <lightning:outputField fieldName="Invoiced_Amount__c" /> <lightning:outputField fieldName="Actual_Expense3__c"/> <lightning:outputField fieldName="Actual_Profit__c" /> <lightning:outputField fieldName="Actual_Gross_Margin__c" /> </div> </div> </lightning:recordViewForm> </lightning:card> </aura:component>
Thanks!!