function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Aleksey SheldagaevAleksey Sheldagaev 

Attribute type sObject failed to read after Summer'16 update

My Lightning component stopped work after Summer '16 update and LockerService activation
The reason is sObject attribute and its fields not accessible as before.

Here is my attribute and inputReachText component with binded field of Idea:
<aura:attribute name="newIdea" type="Idea" default="{'sObjectType':'Idea', 'Body':''}" />

<ui:inputRichText aura:id="ideaBodyText" value="{!v.newIdea.Body}" label="Description" />
And here is controller code after change the body field and click save:
console.log(cmp.get('v.newIdea')); //= {sObjectType:'Idea', Body:''} - Body is empty
console.log(cmp.get('v.newIdea.Body')); //= TEST BODY
And when trying to send the object to Apex controller method it says 'Unable to read SObject'.
Did anybody face with something similar?
 
Big EarsBig Ears
Could this be a case sensitivity issue with the default attribute? Rather than "SObjectType", try "sobjectType".
Aleksey SheldagaevAleksey Sheldagaev
Actually the problem was in Lightning Locker Service which had a bug. Now it's fixed.
Thanks.
Tommy Vogt 18Tommy Vogt 18
Did someone update something and break this again?  I had a component which was working perfectly two weeks ago and now it no longer works.  I am getting "Unable to read SObject's field value[s]' when trying to pass my custom object into the server method.  This worked two weeks ago!
 
Aleksey SheldagaevAleksey Sheldagaev
Tommy, it would be better if you provide an examlple of your code to make suggestions