I have a lightning component in a custom lightning record detail page. I want to force refresh on the parent page when the lightning component is loaded. i.e.

  1. I open a record.

  2. Record detail page loads- this is the custom lightning record detail page.

  3. Custom lightning component embedded at the bottom of the page loads.

  4. In the custom lightning embedded component, I have the following piece of code. (within helper)

    updateAssignedTo : function(component, event, helper) {
    var recordId = component.get("v.recordId");
    console.log('Record Id&&&&&&****'+recordId);
    var action = component.get("c.updateAssignedTo");
        accountRequestId : recordId,
    action.setCallback(this, function(response){
        var state = response.getState();
        if (state === "SUCCESS") {
        }else if (state === "ERROR") {

var action = component.get("c.updateAssignedTo"); is successfully called.

I am trying the refresh the parent page by the following piece of code.


However, it is not happening.

Is this a feasible way to do it?

  • If the parent component is also custom (your code) - you need to listen to the force:refreshView event - add to your markup: <aura:handler event="force:refreshView" action="{!c.doInit}" /> Apr 15, 2018 at 6:22

1 Answer 1


Try using lightning data service, and then call a controller method in the "recordUpdated" attribute. Something like this-


<aura:attribute name="oppRecord" type="Opportunity" />
<aura:attribute name="recordId" type="Id" />

<force:recordData aura:id="dataService"
                      fields="Id,Name,StageName,..(whatever you want, or use the layout)"

Javascript Controller

handleRecordUpdated : function(component, event, helper) {
    // refresh the page with the record updates

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.