You need to sign in to do that
Don't have an account?
Lek Lextech
Can force:recorddata Lightning Data Service can retrive Record Type Name of Record Id?
Hi all, I try to use force:recorddata to retrive field data from record Id, it even work well to retrive relationship field value, but not for Record Type Name when I use {!v.recordField.RecordType.Name}, it return NULL value. How can I retrive Record Type Name without using Apex?
This is my component code:
This is my component code:
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId"> <aura:attribute name="record" type="Object" /> <aura:attribute name="recordField" type="Object" /> <aura:attribute name="recordError" type="String" /> <aura:attribute name="recordId" type="Id" /> <force:recordData aura:id="recordEditor" layoutType="FULL" recordId="{!v.recordId}" targetError="{!v.recordError}" targetRecord="{!v.record}" targetFields="{!v.recordField}" mode="EDIT" /> {!v.recordField.RecordTypeId} <br/> {!v.recordField.RecordType.Name} </aura:component>