You need to sign in to do that
Don't have an account?
Create a server-side Apex controller class (Project - Quick Start: Lightning Components)
@AuraEnabled public static List<Contact> getContacts() { return [Select Id, Name, Email, Title, Phone From Contact]; }I'm receiving the following error: unexpected token: 'List'
You can try below code but not sure exact reason.
Regards,
Mahesh
All Answers
You can try below code but not sure exact reason.
Regards,
Mahesh
What am I doing wrong here? I followed Mahesh's advice for M Parnell but to no avail.
Challenge Not yet complete... here's what's wrong:
The client side JavaScript controller is not putting a server side action into the queue using $A.enqueueAction
Any ideas?
https://developer.salesforce.com/forums#!/feedtype=SINGLE_QUESTION_SEARCH_RESULT&id=906F0000000MLdgIAG
"you need to place that code inside the class"
Kalue's link is the key. Thanks!
I do have a habit of formatting everything after I copy & paste from Trailhead, though. Just in case I need to go back to it later.