Skip to main content Join us at TDX in San Francisco or on Salesforce+ on March 5-6 for the Developer Conference for the AI Agent Era. Register now.
10 answers
  1. Oct 20, 2024, 12:18 PM

    Try creating the Apex class via Developer Console and save it. Then from your VSC deploy just LWC. 

  2. Sep 25, 2024, 5:49 PM

    Hi @Sindhura Kundurthi This issue needs further review and we may need access to your playground. We will reach out to you via email to connect further. 

     

    Best Regards, 

    Ravi

     

    ++CreateTrailheadCase

  3. Sep 23, 2024, 11:18 AM

    @Sindhura Kundurthi  Check the file structure of the project. Most likely, the issue lies there. The compiler cannot find the required files at the specified path.

     

    Try to use this code: LINK

     

    Sincerely, 

    Mykhailo Vdovychenko 

    Bringing Cloud Excellence with IBVCLOUD OÜ

  4. Sep 23, 2024, 11:17 AM

    @Mykhailo Vdovychenko my trailhead challenge is about "Deploy a Component That Lists Contacts"  which is the challenge given in the module "Use Apex to work with Data". I think the code you have provided me is relevant for the challenge in the module "Handle server errors". Please correct me if iam wrong.

  5. Sep 23, 2024, 11:06 AM

    The following is the error iam getting now. It says "Cannot find Lightning Component Bundle WorkingWithDataInLWC". Please suggest. Attaching the screenshot for reference.

  6. Sep 23, 2024, 10:59 AM

    @Sindhura Kundurthi Compare your code with provided code:

     

    ContactController:

     public with sharing class ContactController {  @AuraEnabled(cacheable=true)  public static List<Contact> getContacts() {    // The following line is used only for the last challenge    throw new AuraHandledException('Forced error');    // return [SELECT FirstName, LastName, Email FROM Contact WITH SECURITY_ENFORCED ORDER BY LastName, FirstName];  }}

    AccountController: 

    public with sharing class AccountController {  @AuraEnabled(cacheable=true)  public static List<Account> getAccounts() {    // The following line is used only for the last challenge    throw new AuraHandledException('Forced error');    // return [SELECT Name, AnnualRevenue, Industry FROM Account WITH SECURITY_ENFORCED ORDER BY Name];  }  @AuraEnabled(cacheable=true)  public static List<Contact> getRelatedContacts(Id searchId) {    return [SELECT Name, Title, Email, Phone FROM Contact WHERE AccountId = :searchId WITH SECURITY_ENFORCED];  }}

    https://github.com/gvgramazio/trailhead-module-lightning-web-components-and-salesforce-data

     

    Sincerely, 

    Mykhailo Vdovychenko 

    Bringing Cloud Excellence with IBVCLOUD OÜ

  7. Sep 23, 2024, 10:53 AM

    @James Bengel I have checked my profile access i.e "System Administrator Access" in my org. I have access to the class 'ContactController' . I have attached the screenshot. Please let me know whether i need to check anything else. 

  8. Sep 19, 2024, 7:42 PM

    Have you checked your profile/applicable permission sets to see if you have permission to access the class? That would be my first guess.

     

    You'll find it under Setup -> Users -> Profiles or Setup -> Users -> Permission Sets in the Apps section. In either case, it will look like this:

    Have you checked your profile/applicable permission sets to see if you have permission to access the class? That would be my first guess.

    That's been a requirement for some time now, but it's possible the Trailhead unit wasn't updated to include it. Or that it was assumed you'd know this.)

  9. Sep 19, 2024, 6:17 PM

    Hi, @Sindhura Kundurthi

     

    Compare your code with provided code:

     

    ContactController:

    public with sharing class ContactController {

    @AuraEnabled(cacheable=true)

    public static List<Contact> getContacts() {

    // The following line is used only for the last challenge

    throw new AuraHandledException('Forced error');

    // return [SELECT FirstName, LastName, Email FROM Contact WITH SECURITY_ENFORCED ORDER BY LastName, FirstName];

    }

    }

    AccountController: 

    public with sharing class AccountController {

    @AuraEnabled(cacheable=true)

    public static List<Account> getAccounts() {

    // The following line is used only for the last challenge

    throw new AuraHandledException('Forced error');

    // return [SELECT Name, AnnualRevenue, Industry FROM Account WITH SECURITY_ENFORCED ORDER BY Name];

    }

    @AuraEnabled(cacheable=true)

    public static List<Contact> getRelatedContacts(Id searchId) {

    return [SELECT Name, Title, Email, Phone FROM Contact WHERE AccountId = :searchId WITH SECURITY_ENFORCED];

    }

    }

    Sincerely, 

    Mykhailo Vdovychenko 

    Bringing Cloud Excellence with IBVCLOUD OÜ

0/9000