0

I use a lighting web component to create multiple related records linked to a parent record. After this is completed I use the NavigationMixin to redirect back to the parent record. I am successfully redirected but the related list does not show the newly created records and I need to refresh the page again before they appear.

Is there anyway I can force the page to be refreshed or to display these new related records when I am initially redirected? Below is the sample code of the final redirect

navigateToParentRecord(){
    this[NavigationMixin.Navigate]({
        type: 'standard__recordPage',
        attributes: {
            recordId: this.recordId,
            actionName: 'view'
        }
    });
}

Thanks

2
  • 2
    Does this answer your question? Force refresh view in LWC. Check the answer by Fabien Taillon Oct 16 '20 at 13:28
  • Thanks so much Rahul, the new Winter '21 function of getRecordNotifyChange() did the trick. Great.
    – Mark Dale
    Oct 16 '20 at 13:58