• Joe Hickox
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
string propEmail;
   list<property__C> newPropList=[select name,days_on_market__c,broker__r.email__c from property__c where date_listed__c>=LAST_N_DAYS:30];    
                                  system.debug('The list items are........:'+newPropList);
    for(property__C p:newproplist)
     {
         propEmail=p.name+':'+p.broker__r.email__c;
         system.debug('The concatenated string is.....:'+propEmail);
     }
     getting the following error:
Challenge not yet complete in My Trailhead Playground 2
We can’t find the correct SOQL query in the PropertyUtility class.
this is my solution..any corrections let me know..tq

Hi,

 

I have a Apex class written as below. I need help on how to write test method for the same:

 

public with sharing class Controller{

  
    
    public ApexPages.StandardController standardContactController;
        
    public Controller(ApexPages.StandardController cntrl) {
        
        standardContactController = cntrl;
      
    }
    public pageReference doSaveAll() 
    {
        
        pageReference p;
         
        try
        {
         Guest_Profile__c gp = (Guest_Profile__c)standardContactController.getRecord();
         
         standardContactController.save();
         
         
         p=new pageReference ( 'https://idsfortune-developer-edition.na12.force.com/apex/My_Profile_Edit?id='+gp.id+'&save=0');
          
        }
        catch(Exception e)
        {
        
        }
        return p;
    }
    
    
     public pageReference doEdit() 
    {
        
        pageReference p;
         
        try
        {
         Guest_Profile__c gp = (Guest_Profile__c)standardContactController.getRecord();
         
         standardContactController.edit();
         
         
         p=new pageReference ( 'https://idsfortune-developer-edition.na12.force.com/apex/My_Profile_Save?id='+gp.id+'');
          
        }
        catch(Exception e)
        {
        
        }
        return p;
    }
}