I have a lightning component that is supposed to refresh the record page. I have it implemented as an action in a visual flow, but it returns the following error:
"Error element Refresh_Record_Page (FlowActionCall). We can't execute this action. Ask your admin to check that the "c:refreshRecordPage" Lightning component's client-side controller includes an "invoke" method and that My Domain is enabled and deployed for your org."
Here is the code for my lightning component:
Component:
<aura:component implements="lightning:availableForFlowActions">
<aura:handler event="aura:locationChange" action="{!c.update}"/>
</aura:component>
Controller:
({
update : function (component, event, helper) {
// Get the new location token from the event if needed
var loc = event.getParam("token");
$A.get('e.force:refreshView').fire();
}
})