I have a different lightning flexipage intended for different record types. When I click a button on the page it changes the record type (using apex). When I get back from the action I want to refresh the current page so that I can now see the new flexipage.
There are times that this works, but for some reason many times it does not. Is there a reason why at times the refresh doesn't work?
This is a lightning console app.
What I've Tried
$A.get('e.force:refreshView').fire();
workspaceAPI.closeTab({tabId: tabId});
...together with...
workspaceAPI.openTab({ recordId: recordId, focus: true });
const navEvt = $A.get('e.force:navigateToSObject'); navEvt.setParams({ 'recordId': recordId, 'slideDevName': 'related' }); navEvt.fire();
const navService = component.find('navService'); const pageReference = { type: 'standard__recordPage', attributes: { recordId: recordId, objectApiName: 'Record__c', actionName: 'view' } }; navService.navigate(pageReference);
<lightning:button...