function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ankit Maini.Ankit Maini. 

Not able to reLoad parent component

I have oveveride the stadard "New"  button with a component (Parent) and in that parent component there is a child component. In the child component I have a button and on that button click I am navigating it to the record detail page( Which is actually the "View" itself.
But navigation is not working ( As init method is not callling again of the Parent component)

ParentComponent (Overide on "New" button)
<aura:component implements="lightning:isUrlAddressable,lightning:actionOverride,force:appHostable,flexipage:availableForAllPageTypes">
  
    <aura:handler name="init" value="{! this }" action="{! c.init }"/>
    
    
    <c:NavigationDemoView />
</aura:component>

Parent COntroller
({
	init : function(component, event, helper) {
        debugger;
	alert(3);
	}
})

Child Component 
<aura:component implements="lightning:isUrlAddressable,lightning:actionOverride,force:appHostable,flexipage:availableForAllPageTypes">
    <aura:handler name="init" value="{! this }" action="{! c.init }"/>
   
     <lightning:button name="s" onclick="{!c.navigateRecord}" value="click"  label="navigate to sobject"/>
   
</aura:component>
Child COntroller:
({
	init : function( component, event, helper) {
		debugger;
       alert('child called');
	},
     navigateRecord : function(component, event, helper) {
         debugger;
      	var navEvt = $A.get("e.force:navigateToSObject");
        navEvt.setParams({
          "recordId": "a040I00002W6ryNQAR"
        });
        navEvt.fire();
      }
})

If I access the view of this record (a040I00002W6ryNQAR) and click on the buttton it will not reload init of my parent.

But if access different record and click on the button it will redirect to this(a040I00002W6ryNQAR) record.

So I am not able to understand that why I am not able to redirect to the same record again.

Note: Instead of navigateToSObject, I have used other options like navigateTOURL and calling another component and calling navigatrtosobject from there but nothing is working for the same recordID for which I am viewing the record.

Please suugest.