You need to sign in to do that
Don't have an account?
George Williams
Quick Start: Lightning Components Broken
For whatever reason the Lightning app built during the above Trailhead project does not work when previewed. I keep getting this error:
This page has an error. You might just need to refresh it. Error during init [Cannot read property 'apply' of undefined]
No issues with the project chanllenges, in fact I have completed the project trail. Checked my code, exact same as given during the project steps.
This page has an error. You might just need to refresh it. Error during init [Cannot read property 'apply' of undefined]
No issues with the project chanllenges, in fact I have completed the project trail. Checked my code, exact same as given during the project steps.
May I request you please post the code snippet of what you have done so far so that we can look into it and do the needful accordingly.
Regards,
Nagendra.
Component Code:
Component Controller Code:
App Harnes Code:
File: MyContactListController.apxc
See what I did here? The original code just returns the SOQL result without storing it in a List variable. The correct (standard) practice is to declare a local variable, SELECT into the variable, then return the variable.
This should now work for you.
I used that, was also unable to see any results and got the following error in the console:
Fixed this by adding the following into the datatable component definition: . Now the contacts display as expected like the image below:
Documentation reference: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/aura_compref_lightning_datatable.htm