Skip to main content

I have a bug with Lightning Data Services that I have been banging my head on for a few days now.

 

I am running in *preview* mode, as this issue is a blocker to my migration. I also think it's possible that the fact I am in preview mode is the source of my bug.

 

I can correctly access !v.recordId properly, but I get an error when I try to access the properties of the record.

 

Here's the error I get: Error This entity is not currently supported by force:recordData.

 

Below is my code.

 

Any idea of why I can't access the data in the object when I can access the object?

 

Thanks,

Jason

 

<aura:component implements="flexipage:availableForRecordHome,force:lightningQuickActionWithoutHeader,force:hasSObjectName,force:hasRecordId">

    <aura:attribute name="record" type="Object"/>

    <aura:attribute name="simpleRecord" type="Object"/>

    <aura:attribute name="recordError" type="String"/>

    <force:recordData aura:id="recordLoader"

      recordId="{!v.recordId}"

      fields="Name,Probability"

      targetRecord="{!v.record}"

      targetFields="{!v.simpleRecord}"

      targetError="{!v.recordError}"

      />

    <!-- Display a header with details about the record -->

    <div class="slds-page-header" role="banner">

        <p class="slds-text-heading--label">This is a {!v.sObjectName} {!v.simpleRecord.Name}</p>

        <h1 class="slds-page-header__title slds-m-right--small

            slds-truncate slds-align-left">This is a {!v.sObjectName} {!v.simpleRecord.Name} {!v.recordId} Id, {!v.simpleRecord.Propbability}</h1>

    </div>

    <!-- Display Lightning Data Service errors, if any -->

    <aura:if isTrue="{!not(empty(v.recordError))}">

        <div class="recordError">

            <ui:message title="Error" severity="error" closable="true">

                {!v.recordError}

            </ui:message>

        </div>

    </aura:if>

</aura:component>

2 commenti
0/9000