Skip to main content

I am receiving an error stating that this APEX class does not exist while working through the final step however it does. I am connected to the org and have successfully found the LWC. 

 

#Trailhead Challenges

4 respostas
  1. 16 de set. de 2025, 13:55

    Hi @Heather Johnson - 

    • Confirm you are in the same Trailhead Playground selected in the Hands-on Challenge picklist.
    • In Setup -> Apex Classes, verify the class name and API Name are exactly DashboardController.
    • Open Developer Console  -> File  -> Open  -> DashboardController.cls, then Compile; or use Setup  -> Apex Classes  -> Compile All Classes to ensure no hidden errors.
    • Check the class declaration: public with sharing class DashboardController { ... }.
    • Make sure any methods you call from LWC are marked with @AuraEnabled and public static.
    • In the LWC, import using the correct syntax:
    •  import methodName from '@salesforce/apex/DashboardController.methodName';
    • If the org has a namespace, either remove it (unmanaged playground) or include it correctly in the import path.
    • In VS Code (if used), re-authorize the correct playground, set it as default, and redeploy the class.
    • Refresh the contact/Lightning page and re-run the challenge verification after deployment.