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
Yasar ShaikhYasar Shaikh 

lightning component framework specialist step 7 error - The AddBoatReview helper's onInit() funciton doesn't set its result as the BoatReview component attribute.

Hi All, 

I am struggling with following error: 
User-added image

The functionality is working as expected(as I tested it from UI). I think, I am missing a bit only. 

Have added code for the BoatReview component and BoatDetails component along with controller and helper. Could you please guide me, on the same!.

Thanks you!


 
Yasar ShaikhYasar Shaikh
Sorry for the miss, here is the link: 
https://gist.github.com/yasarshaikh/8edea8850bced036bec925a1d6f6db47

Since, I could not add all the code here, I have added this link. 
chip5chip5

The problem seems to be the syntax you use for setting Boat__c.

It accepts this:

component.set('v.boatReview.Boat__c', component.get('v.boat').Id);

It rejects this:
component.get('v.boatReview').Boat__c = component.get('v.boat').Id;

even though they both work. Maybe the difference is using set() fires an event and the other way doesn't?