Skip to main content Unisciti a noi al TDX, a San Francisco o su Salesforce+, il 5-6 marzo per la conferenza degli sviluppatori sull'era degli Agenti IA. Registrati ora.

#Trailhead Challenges2.444 utenti parlano di questo argomento

Hands-on challenges are the “secret sauce” of Trailhead. Before searching for solutions to superbadge challenges, review the Salesforce Certification Program Agreement and Policies.

The thing is I executed the file name dreamhouseapp.apex as per the rules of the trailhead. Despites of all this I see an error in my studio. The SS as provided below

 

technical error in apex

 

Screenshot 2024-10-18 002646.png

 

#Trailhead Challenges

18 risposte
  1. 18 ott 2024, 14:58

    public with sharing class HouseService {

        @AuraEnabled(cacheable=true)

        public static List<House__c> getRecords() {

            try {

                // Create a list of House records from a SOQL query

                List<House__c> lstHouses = [

                    SELECT

    houseservice.cls

     

    System.debug(HouseService.getRecords()); -dreamhouse.apex

                       Id,

                       Name,

                       Address__c,

                       State__c,

                       City__c,

                       Zip__c

                       FROM House__c

                       WITH USER_MODE

                       ORDER BY CreatedDate

                       LIMIT 10

                    ];

                      return lstHouses;

            }

            // Code to handle exception

            catch (Exception e) {

               throw new AuraHandledException(e.getMessage());

            }

        }

    }

    the class i made -HouseService.cls

     

    the test file - dreamhouseapp.apex

    System.debug(HouseService.getRecords());

0/9000