1

We have person account enabled org we are unable to get some formula fields and __pc fields through lightning data service we chaecked FLS and everything look correct other fields are coming but formula fields are not being returned by lightning data service. We also added those field on the page layout and used layout ="FULL"

<aura:attribute name="account" type="Object"/>
    <aura:attribute name="simpleAccount" type="Object"/>
    <aura:attribute name="recType" type="String"/>
    <aura:attribute name="accountError" type="String"/>
    <aura:attribute name="SSN" type="String" />
    <force:recordData aura:id="accountRecordLoader"        
    fields="Test__c"        
    recordId="{!v.accRecId}"        
    layoutType="FULL"        
    targetRecord="{!v.account}"       
    targetFields="{!v.simpleAccount}"        
    targetError="{!v.accountError}"    />

<lightning:formattedText   value="{!v.simpleAccount.Test__c}" />

Any body having the same issue or faced something similar?

1
  • 1
    I just tried using force:recordData in Spring 19 and WInter 19 orgs, i was able to see data in Formula and contact fields(__pc), can you post code? Commented Jan 14, 2019 at 22:36

1 Answer 1

0

Hi after lot of debugging and doing trial and error I found if I use lightning:formattedText the value is blank if I use ui:outputText or directly it is working as expected

<aura:attribute name="account" type="Object"/>
    <aura:attribute name="simpleAccount" type="Object"/>
    <aura:attribute name="recType" type="String"/>
    <aura:attribute name="accountError" type="String"/>
    <aura:attribute name="SSN" type="String" />
    <force:recordData aura:id="accountRecordLoader"        
    fields="Test__c"        
    recordId="{!v.accRecId}"        
    layoutType="FULL"        
    targetRecord="{!v.account}"       
    targetFields="{!v.simpleAccount}"        
    targetError="{!v.accountError}"    />

    <ui:outputText value="{!v.simpleAccount.Test__c}" /> 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .