On a record detail page for communities (created in Builder) we have a few custom Lightning Components as well as a few
Related List - Singlestandard components.
One of the
Related List - Singlecomponents is pointing to a junction object between this record and some other object (call it
ChildObject__c). One of our component is a list of
ChildObject__crecords that the user might want to add to that related list, i.e. create a new junction object.
That component allows the user to select one of those records and create a new junction object. We can do all that programmatically and it is helpful to the user.
The problem is that there is no way to refresh the contents of the
Related List - Single. So in effect, the user creates these new junction objects and links their parent record to these
ChildObject__crecords, but there is no visible indication that that actually happened, short of hitting F5.
I tried to call
$A.get("e.force:refreshView")on the callback from creating the record. That does refresh the page, we see the three dots spinner and the other components reload themselves, but the
Related List - Singlecomponents do not. They sit there adamantly displaying their old cached data.
Is this a bug in
force:refreshView? Is it designed to work that way (being called from a related list, but not update a related list)? Is there a better way to force a related list to retrieve data?
Well, I got a concrete answer from Support.
It’s an ongoing bug with Salesforce, and as much as I pressed the support reps, there is no hint as to when (if ever) this will be resolved.
The workaround presented in the issue is a non-starter for us, so we’re really stuck here.