Skip to main content
Drey Tanig a publié du contenu dans #Trailhead Challenges

Unable to find Apex action class referenced as 'ContactController'. 

 

can someone help me i follow all the steps but im stuck with this error Thank you! 

 

#Trailhead Challenges  #Salesforce Developer  #Apex  #Apex Class  #Trailhead  #Trailhead Superbadges  #Trailhead Playground  #Trailhead Developer Org

1 commentaire
  1. 8 mai 2025, 07:36

    Hi, 

    The error you are facing "Unable to find Apex action class referenced as 'ContactController'" indicates Salesforce cannot locate the ContactController Apex class referenced by a Lightning Web Component (LWC) or Aura Component. To resolve this, verify the class exists in Setup > Apex Classes or Developer Console; if missing, create it with a method annotated with @AuraEnabled(cacheable=true) (e.g., public static List<Contact> getContacts()) to ensure LWC or Aura can call it. 

    If the class exists, check whether the method is annotated with @AuraEnabled , If not then do it. 

    Check the LWC’s JavaScript for the correct import (e.g., import getContacts from '@salesforce/apex/ContactController.getContacts') or the Aura component’s controller="ContactController" attribute, ensuring no typos or case mismatches. Confirm your user/profile has access to the Apex class via Setup > Profiles > Apex Class Access. 

     

    If this resolves your query mark the answer as helpful! 

    Thanks.

0/9000