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
Megan HooserMegan Hooser 

Transform SQL Queries to SOQL Queries in a Lightning App -step 3

I am on step 3 of Display Books with Their Authors. I followed the steps exactly but am getting this error:

Step not yet complete... here's what's wrong:
The 'getBooksAndAuthor' method does not appear to contain the correct code. Ensure you copied the code entirely.

Can anyone assist?

 
Raj VakatiRaj Vakati
Use this code 
 
public class with shating Books4EveryoneHomeController {

@AuraEnabled
public static List<Book__c> getBooksAndAuthor(){
  return [SELECT Name, Description__c, Author__r.Name
    FROM Book__c];
}
  

}

 
Raj VakatiRaj Vakati
public class with sharing Books4EveryoneHomeController {

@AuraEnabled
public static List<Book__c> getBooksAndAuthor(){
  return [SELECT Name, Description__c, Author__r.Name
    FROM Book__c];
}
  

}