I am trying to refresh the parent from the child. From the Parent,I am opening a modal window for update. Once I save the record, modal window close and the parent section should be refreshed.

Created an event - RefreshTemplate.( ).

In the Parent I refer that

On the Parent Controller ,

handleComponentEvent : function(component, event, helper){
    var message = event.getParam("message");
    var caseId=component.get("v.recordId");
        console.log('Inside handleComponenetEvent'+ caseId);
     var action=component.get("c.getCaseTriageInfo"); 

    action.setCallback(this,function(response) {
            var state = response.getState();
            if (state === 'SUCCESS'){
                //var srId=component.get("v.parentIdToRefresh");
            } else {
                 //do something

On the Child Modal Window: I registered the event

and on the helper - after Sucessfull Update message ,I am firing the event

var event = component.getEvent("lightningEvent");
                "message" : "MESSAGE TEST" });


Not sure if I am missing anything here.

  • you are firing refresh in the callback in success , did you check if the response is success? – User6670 May 20 '20 at 18:24
  • Yes, I put some display in the handleComponentEvent action and I see the Service Request Id and the message fired from the event from the Child – Regi Varghese May 20 '20 at 18:33
  • you can try putting a handler for refresh view and reinitialize the component like this <aura:handler event="force:refreshView" action="{!c.doInit}" /> ,if you have any initialization function – User6670 May 20 '20 at 18:43
  • I get this message in the console: AuraAlohaFrameNavigator.js:156 [LEXI:navigator:communication] failed to connect with lightning experience WindowMessengerTimeoutError: Timeout exceeded waiting for handshake to complete from parent at new b (farmerssrm--sodev6--vlocity-ins.cs50.visual.force.com/jslibrary/…) at farmerssrm--sodev6--vlocity-ins.cs50.visual.force.com/jslibrary/… – Regi Varghese May 20 '20 at 18:45
  • at what point do you get this error ,when you refresh the page.? – User6670 May 20 '20 at 20:00

Per this Salesforce Developer forum question, be sure to add a handler event to your aura component, such as:

<aura:handler event="force:refreshView" action="{!c.isRefreshed}" />

with the controller like:

saveAccount : function(component,event,helper){

    var saveAccountAction = component.get("c.accountSaved");
    // your code to send contact details to server

    actionSave.setCallback(this, function(saveAccountAction) {
        if (saveResult.state() === "SUCCESS") {
            //contact saved Successfully
            //Fire the refresh view event to update Account detail view

        }else if (saveResult.state() === "ERROR") {
            console.log("Error Saving Contact ");

/*page refresh after data save*/

isRefreshed: function(component, event, helper) {
/*page refresh after data save*/

I have also successfully used


Such as

testHelper : function(component, event) {
    //helper body

    //invoke the Apex method
    //close quickaction window
    //reload page to display updated information

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.