You need to sign in to do that
Don't have an account?
IKZ
Neither refreshTab() or force:refreshView work in console app
I've tried both options in custom lightning component and they work in sales app but as soon as I switch to console app refresh doesn't happen
1.
2.
and as per https://developer.salesforce.com/docs/atlas.en-us.api_console.meta/api_console/sforce_api_console_lightning_refreshTab.htm efreshTab() only works in Lightning console apps
any suggestions please?
thanks
1.
refreshAndClose: function (component) { $A.get("e.force:refreshView").fire(); let sObjectEvent = $A.get("e.force:navigateToSObject"); sObjectEvent.setParams({ "recordId": component.get("v.recordId") }); sObjectEvent.fire(); }
2.
({ refreshFocusedTab : function(component, event, helper) { var workspaceAPI = component.find("workspace"); workspaceAPI.getFocusedTabInfo().then(function(response) { var focusedTabId = response.tabId; workspaceAPI.refreshTab({ tabId: focusedTabId, includeAllSubtabs: true }); }) .catch(function(error) { console.log(error); }); } })
and as per https://developer.salesforce.com/docs/atlas.en-us.api_console.meta/api_console/sforce_api_console_lightning_refreshTab.htm efreshTab() only works in Lightning console apps
any suggestions please?
thanks
With option 1, do you have the refreshView handler defined in cmp file?
<aura:handler event="force:refreshView" action="{!c.doRefreshView}" />
With option 2, do you have Lightning:workspace component defined in cmp file?
<lightning:workspaceAPI aura:id="workspace" />
Strangely SF components are refreshed e.g. chatter, but not my custom one
I tried Akram G suggestion (https://salesforce.stackexchange.com/questions/179497/lightning-refreshview-event-not-working-on-record-detail-page)
and it works, just not sure if that's the best solution, as I was trying to avoid refreshing all tabs like corresponding account for example