I am working on setting up a Napili community and have a Community Page that includes the "Record List" component
In my lightning component I am inserting a record and when done I am using:
$A.get("e.force:refreshView").fire();
When I do so the community appears to refresh but the new record does not appear in the list of records. I have to hit the browser refresh a few times for it to show up.
The page and component are standard so there is no way for me to modify the Record List component. It has a data-aura-class of forceCommunityRecordListStandard
Does anyone know of a way to reliably refresh the Record List component after inserting a new sObject record? I would hate to have to add an alert that it make "Take a few minutes to show up" for this most basic request.
I have also tried:
window.setTimeout(
$A.getCallback(function () {
$A.get("e.force:refreshView").fire();
})
);
to no avail.
Additionally navigating to another page and back to the list view does not work either. I have to hard refresh the browser a few times or clic on the "View All" link on the list view after a few tries the record will show up.
Logging out then back in also allows the record to show up. All of this is not desirable.
window.location.reload()
works but I would prefer to not have to reload the site just to show a record when it should refresh the record list component......but as a fallback I guess I could use it