9

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.

5
  • 1
    What happens if you reload the window via JavaScript window.reload() or any other equivalent Commented Apr 15, 2017 at 0:37
  • @MohithShrivastava - 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
    – Eric
    Commented Apr 15, 2017 at 0:41
  • The refresh view event I thought only refreshes the detail view and not list view. Commented Apr 15, 2017 at 0:43
  • How about navigateToUrl event .If you use relative path it just loads like a partial Ajax refresh Commented Apr 15, 2017 at 0:44
  • 2
    When i use navigaToURL and use '/' for the path i get to home page and when I click on navigation menu to goto Object page showing the list view it is not updated until I refresh the browser. And the docs say refreshView "which reloads all data for the view"
    – Eric
    Commented Apr 15, 2017 at 0:50

1 Answer 1

0

Could you disable debug setting (in Dev org), client-side component caching and uncheck Enable secure and persistent browser caching to improve performance and check again.

You must log in to answer this question.

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