4

Is it possible to refresh a standard related list (Contact) from a component that lives on the same page? I have a custom component that imports a contact from an external system and I need the "Contact" related list to refresh in the action's callback.

Is this possible?

2
  • 1
    Have you tried force:refreshView?
    – sfdcfox
    Sep 19, 2017 at 15:35
  • Perfect. If you want to actually reply as an answer I'll mark it as correct. Sep 19, 2017 at 15:58

1 Answer 1

7

After modifying data, you should tell the standard components to refresh the data. You do this by using force:refreshView. This is typically done using the following code:

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

This works in Lightning Experience, Salesforce1, and Communities that use Lightning.

2
  • @manza auradocs is the best reference. If for some reason it's not working, consider submitting a case to support. It might a permissions issue, you might need to clear your cache, or it could be something else. Many of the methods in $A are also in the Lightning Component Developer Guide, but they're not in any consolidated form.
    – sfdcfox
    Jul 5, 2018 at 4:04
  • this would not work if "Use Lightning Web Security for Lightning web components and Aura components" is enabled under the session setting Jun 20, 2023 at 13:40

You must log in to answer this question.

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