Skip to main content
I have to refresh the LWC component not the complete page

My scenario is once the record is updated i have to refresh the component.

i have tried below but its not working,

 eval("$A.get('e.force:refreshView').fire()");

My LWC component on the service console page
2 respostas
  1. 21 de mai. de 2020, 16:48
    Please use the followings:

    1. Import refreshApex method.

         import { refreshApex } from '@salesforce/apex';

    2. In the place you want to refresh.

         refreshApex(this.yourRecord);    

     Note: yourRecord usually links to @wire method to pull the data from Salesforce.

     
0/9000