+ Start a Discussion
Kuldeep Tyagi 14Kuldeep Tyagi 14 

Trailhead: unable to save lightening component via developer console

Hello,
This is related to trailhead Lightning components: Attributes and Expressions. While saving below code for the lightening component for the challenge in devloper console. I am getting error: FIELD_INTEGRITY_EXCEPTION: "Failed to save undefined: null: Source". If I replace the outputCurrency and ouptutNumber tag with outputText then it get saved. But that does not meet the challenge. Can someone please advise?

<aura:component >
    <aura:attribute name="item" type="Camping_Item__c" required="true"/>
    <p>Name:
    <ui:outputText value="{v.item.Name}"/> 
    </p>
    <p>
    Price:
    <ui:outputCurrency value="{v.item.Price__c}"/> 
    </p>
    <p>
    Quantity:
    <ui:outputNumber value="{v.item.Quantity__c}"/>
    </p>
    <p>
    Packed:
    <ui:outputCheckbox value="{v.item.Packed__c}"/>
    </p>
</aura:component>

Thanks,
Kuldeep
Best Answer chosen by Kuldeep Tyagi 14
Kuldeep Tyagi 14Kuldeep Tyagi 14
Finally, I found the descrepency. I am missing '!' symbol in the expression. 

Thanks,
Kuldeep

All Answers

SandhyaSandhya (Salesforce Developers) 
Hi,

Please refer below link for similar discussion with different solutions.

https://developer.salesforce.com/forums/?id=906F0000000kCoeIAE
 
Hope this helps you!

If this helps you, please mark it as solved.

Thanks and Regards
Sandhya
Kuldeep Tyagi 14Kuldeep Tyagi 14
Finally, I found the descrepency. I am missing '!' symbol in the expression. 

Thanks,
Kuldeep
This was selected as the best answer
Jasmin ChauhanJasmin Chauhan
If you get below error then you have to just change API version 41.0

Versions are assigned declaratively in the Developer Console. When you’re working on a component, click Bundle Version Settings in the rightpanel to define the version. Change API version as 41.0
User-added image
User-added image
Priya shah 2Priya shah 2
Hey....many thanks!
It was a big pushback and you saved me! Changing the version to 41.0 WORKED!
Rudra Pratap SinghRudra Pratap Singh
@Jasmin Chauhan
Can you please elaborate about the reason why going back to previous version helps here? What if I don't want to go back to the previous version in such cases?
rmk1rmk1
The  lowest API version i could go is 42 from dev console. Any other ways to chane it, please let me know. Thanks
Mateus AugustoMateus Augusto
Guys! The code is correct, the problem is the xml version. I used VsCode and downloaded the files used in the track to change the xml file. I put version 41 and it worked. Version> 43 does not work. @Priya shah 2 thnks

User-added image
Vijay ummedaVijay ummeda
Hi

The  lowest API version i could go is 43 from dev console. Any other ways to chane it, please let me know.