• D Manohar Reddy
  • NEWBIE
  • 0 Points
  • Member since 2023

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 0
    Replies
there is no code errors but while importing source to org this error is coming.
Code is :
public with sharing class AccountClass{
   @AuraEnabled(cacheable=true)
   public static List<Account>getAccounts(){
    try {
          return[SELECT Name, Id FROM Account with SECURITY_ENFORCED];
       
    }catch (Exception e) {
        throw new AuraHandledException(e.getMessage());
        }
    }
}
public with sharing class AccountClass{
   @AuraEnabled(cacheable=true)
   
   public static List<Account>getAccounts(){
    try {
          return [SELECT Name, Id FROM Account];
       
    }catch (Exception e) {
        throw new AuraHandledException(e.getMessage());
        }
    }
}
in the Above Accoun is Standard Object missing retunrn Statement