You need to sign in to do that
Don't have an account?
Lightning Data Service Trailhead - pass conditions broken?
I am struggling to pass the final unit of this module, "Handle Record Changes and Errors". The error message I'm stuck on is "The 'accEdit' Lightning Component does not appear to be displaying the 'recordSaveError' value inside a div with the class 'recordError'."
I am displaying the error as described, and I've copied and pasted various solutions posted here and on StackExchange several months ago, but it appears the validation checks have changed as none of these things work. Below is my current `accEdit.cmp` - as you can see, I'm trying a variety of display approaches and can't get any of them to pass.
Any hints would be welcomed!
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId" access="global" > <aura:attribute name="accountRecord" type="Account" /> <aura:attribute name="simpleAccountRecord" type="Account" /> <aura:attribute name="recordSaveError" type="String" default="" /> <force:recordData targetRecord="{ v.accountRecord }" targetFields="{! v.simpleAccountRecord }" recordId="{! v.recordId }" mode="EDIT" fields="Name" aura:id="record" targetError="recordSaveError"/> <lightning:card title="Edit Account"> <aura:if isTrue="{! v.recordSaveError }"> <div class="recordSaveError"> {! v.recordSaveError } Error: <ui:outputText value="{! v.recordSaveError }"/> Error: <lightning:formattedText value="{! v.recordSaveError }"/> <ui:message title="Error" severity="error" closable="true"> {!v.recordSaveError} </ui:message> </div> </aura:if> <lightning:input value="{! v.simpleAccountRecord.Name }" label="Account Name" /> <lightning:button label="Save Account" onclick="{! c.handleSaveRecord }" /> </lightning:card> </aura:component>
<div class="recordSaveError">
"The 'accEdit' Lightning Component does not appear to be displaying the 'recordSaveError' value inside a div with the class 'recordError'."
recordError != recordSaveError ?
All Answers
<div class="recordSaveError">
"The 'accEdit' Lightning Component does not appear to be displaying the 'recordSaveError' value inside a div with the class 'recordError'."
recordError != recordSaveError ?