Skip to main content Join the Agentforce Virtual Hackathon to build innovative solutions and compete for a $50k Grand Prize. Sign up now. Terms apply.
Hi , This is for challenge under "Create Relationship Queries with Custom Objects".

 

I get the error "We can’t find the correct SOQL query in the PropertyUtility class. "

 

I wrote below Class .. please let know my mistake

 

public class PropertyUtility {

 

    public static void newListedProperties(){

 

        List <Property__c> newPropList= New List <Property__c>();

 

        newPropList = [Select Name,Broker__r.Email__c,Days_On_Market__c from Property__c where Date_Listed__c = LAST_N_DAYS:30];

 

        for(Property__c prop :newPropList ){

 

            

 

            string propEmail= prop.Name +':'+ prop.Broker__r.Email__c;

 

           system.debug(propEmail);

 

            

 

        }

 

        

 

        

 

    }

 

}
3 réponses
  1. 19 juin 2020, 01:09
    public class PropertyUtility{

     

        public static void newListedProperties(){

     

            

     

             

     

          List<Property__c>  newPropList = [Select Name,Days_On_Market__c,Broker__r.Email__c from Property__c where Days_On_Market__c < 31];

     

            

     

            

     

            for(Property__c p : newPropList){

     

             string  propEmail = p.Name +':'+ p.Broker__r.Email__c ;

     

                system.debug(propEmail);

     

            }

     

        }

     

    }

     

    This worked to me 
  2. 30 janv., 20:20

    Hi @Anthony Law I am a member of Trailhead Help, Can you please let us know if the issue still exists or is resolved? If it is resolved, please post the solution or mark any one of them above which helped you to resolve your query as it "Best Answer" to close this thread. If not, kindly provide a few more details of the badge along with the error message. Thank You!  

     

    ++TrailheadHelpFollowUp

  3. Forum Ambassador Steven Trumble (Skie)
    24 janv., 22:01
    What is the specific error you are getting? Can you check the import logs
  4. 24 janv., 21:54

    please check the link; 

    https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007erEC3SAM

     

     Ensure all required fields, relationships, and custom objects are correctly set up. Check that field names in the sample data match the API names. Temporarily deactivate validation rules or triggers. Verify the sample data for format and relationship IDs. Use the Data Import Wizard or

    Dataloader.io for the import. Let me know if you need more help! 

0/9000