0

I have an aura component that shows data that are called by an API. If I open the component on a customer (B) account and if I had the same component opened on another customer account (A) the data related to customer account B will show on the component of the account from customer A. Is there any way to refresh the component every time I change the tab inside salesforce?

Thanks

1
  • Is this a console based application? Commented Jan 20, 2022 at 15:14

1 Answer 1

0

You first need to add the appropriate interface:

<aura:component implements="force:hasRecordid">

And then add a handler to listen for changes:

<aura:handler name="change" value="{!v.recordId}" action="{!c.loadRecord}" />

Or, you can also use <force:recordData>:

<force:recordData recordId="{!v.recordId}" layout="FULL" recordUpdated="{!c.updateComponentState}" />

You must log in to answer this question.

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