Salesforce Fact #914 | Rerender in Aura to refresh screen flow
Suppose we have created an aura component which embeds a screen flow and it is used as the New button override for the Contact object. Now, while creating record from the Contact related list in the Account detail page we are passing the current account id by parsing the URL. Now, if we leave the screen flow midway and open another account record without refreshing the page and click on the new button on contact related list, it lands on the same page where we had left and the accountId passed is also the old one. To resolve this, we can add the below piece of code in the renderer JS: ({ // Your renderer method overrides go here rerender : function(cmp, helper){ this.superRerender(); // do custom rerendering here $A.get('e.force:refreshView').fire(); } }) With this code added, every time the flow is invoked it gets the correct accountId and starts from first screen.