I'm having TestObject as parent object and New Custom Object having M-D relationship to it. TestObject having Min and Max Rollup summary fields which will rollup number field in child object.

I was rendering parent information using lightning:recordViewForm with certain fields, if we perform any dml in child need to refresh the parent record information.

Here's my Markup code:

<aura:if isTrue="{!v.showViewForm}">
    <lightning:recordViewForm recordId="a0G2800000KJxZp" objectApiName="TestObject__c">
            <lightning:layout class=" slds-wrap custom-layout">

                <lightning:layoutItem size="4" padding="around-small">
                    <lightning:outputField fieldName="Name" class="output-element"/>
                <lightning:layoutItem size="4" padding="around-small">
                    <lightning:outputField fieldName="Max__c" class="output-element"/>
                <lightning:layoutItem size="4" padding="around-small">
                    <lightning:outputField fieldName="Min__c" class="output-element"/>

Whenever i was updating child records, i just need to refresh the parent details.

I tried with setting boolean variable false before making dml, after success callback making the boolean as true, but it didn't reflected.

Here's controller code:

update : function(component, event, helper) {
    component.set("v.showViewForm", false);
    var action = component.get("c.updateParentValues");
        'updateList': component.get("v.records")
    action.setCallback(this, function(response) {
        var state = response.getState();
        if (state === "SUCCESS") {
            component.set("v.showViewForm", true);
            component.set("v.records", response.getReturnValue());


Here's my screen shots

After submitting: enter image description here

After refreshing: enter image description here

Upto my knowledge when we are rebuilding the dom using aura:if it should refresh.

Did i missed anything here (or) Is there any other alternative approaches to refresh the record view form.

I tried with lightning:recordForm as well.

  • Do you have two different components for parent and child records? And that you are making edits in child and expect to refresh parent?
    – Jayant Das
    Jul 30, 2018 at 18:59
  • Have you tried using force:refreshView? It's not the DOM that needs to be updated, it's the underlying data.
    – sfdcfox
    Jul 30, 2018 at 19:28
  • @JayantDas, No im having only one component, parent info will be rendered using record view form and child records are rendering in the table, when click on save im doing dml and tried to refresh the dom using aura:if. Jul 31, 2018 at 4:20
  • @sfdcfox, I tried with force:refreshView $A.get('e.force:refreshView').fire(); as well, but it also didn't worked, If we are doing the dom refresh means, respective data also need to refresh right? Jul 31, 2018 at 4:25

1 Answer 1


did you tried:

<aura:if isTrue="{!v.showViewForm == TRUE}">

I guess, the condition is also true, if you have defined some default value for v.showViewForm, because it checks if the attribute is set.

Let me know, if this helps

Greets, Bernhard

  • Welcome to SFSE! I'm afraid that this doesn't really provide an answer to the question. This may be more appropriate as a comment. Once you gain enough reputation (50) you'll be able to add comments on other people's questions and answers. Please read How to Answer. As a final note, explicitly checking <boolean variable> == true can be simplified to simply <boolean variable>, which is what OP (Original Poster of the question) currently has.
    – Derek F
    Jul 31, 2018 at 12:50
  • Thanks Derek! Yeah, I had no other choice - it was more a suggestion then an answer! Thats true, but it would be also false if the attribute is null or undefined - on which I wanted to point out. Greets Aug 1, 2018 at 9:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .