0

I'm getting an error when setting an Attribute with either custom or standard object in Lightning Component.

Component Code

<aura:attribute name="acc" type="Account" access="global" />

Below is the error message,

enter image description here

The error disappears as soon as removing the Attributes. Any idea what's wrong here? Thanks...!

  • 1
    1.Are the field API names correct? javascript is case sensitive, you need to match exactly. Try removing one by one and isolate the issue – RedDevil May 14 at 9:31
  • Yes, the API names are correct. I removed the custom object and still getting the error even only with Account object. – Sudh May 14 at 9:35
  • @Sudh: Could you edit your post to include component code with any standard object. Tried with Account object, works fine. – Raul May 14 at 9:45
  • P.S. it's sobjectType, not SObjectType. This may be causing the problem. – sfdcfox May 14 at 13:09
  • @Raul: I removed the custom object and keep the standard object, Account, as the above code. But still, I'm receiving the error. – Sudh May 14 at 13:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.