Is there other ways to do this, please let me share.
<aura:component implements="lightning:availableForFlowScreens,lightning:availableForFlowActions">
<aura:attribute name="recordId" type="String" />
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
</aura:component>
Regards,LinThaw({
doInit: function(component, event, helper) {
// Get the record ID attribute
var record = component.get("v.recordId");
// Get the Lightning event that opens a record in a new tab
var redirect = $A.get("e.force:navigateToSObject");
// Pass the record ID to the event
redirect.setParams({
"recordId": record
});
// Open the record
redirect.fire();
}
})
16 respostas