2

I created a popup model using LWC when user click on a button in account detail Page in service console. .After model is closed service console detail page is not refresh(same page need to refresh). I used below code and it is not working in service console. I removed objectApiName and tested .But it's not working. Can someone please tell me what changes are required?

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

1 Answer 1

1

It will not work on the same page.

I see two options here:

  1. (Preferred) You need Aura to fire $A.get('e.force:refreshView').fire();. Aura should catch a custom event from LWC. https://developer.salesforce.com/docs/component-library/bundle/force:refreshView/documentation
  2. (Easy) Fire window.location.reload(); in your LWC.
  3. (Not Recommended) eval("$A.get('e.force:refreshView').fire();");
1
  • Thank You piotr Gajek ,I tried the second option it will refesh the whole page again.I only need to refresh account page
    – Basu
    Commented Sep 3, 2022 at 9:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .