In my opportunity record page I have added 2 different LWC component. componentA is updating the opportunity fields. componentB is displaying some messages based on the opportunity fields. These components are not child parent and displayed in the same page.
I want componentB to refresh and get the latest messages once the record is updated from componentA.
In componentB I am using wire
to call the Apex method which gets all the messages.
@wire(getOpportunityMessages,{recordId: '$recordId'})
DisplayMessages;
In componentA I have tries calling updateRecord(recordInput, clientOptions)
and getRecordNotifyChange(recordIds)
after the opportunity field update but nothing is triggering the wire method in componentB again.
In Aura this can be done using force refresh as it refreshes the complete record. How can we do this is LWC?