• wroxtar
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
    Questions
  • 3
    Replies
The challenge is to search for the inserted record with an inline SOSL search, using Execute Anonymous.

This is what I did using Execute Anonymous Window
 
List<List<sObject>> searchList = [FIND 'Mission Control' IN ALL FIELDS 
                                  RETURNING Contact(FirstName, LastName,
                                  Phone, Email, Description)];
Contact[] searchContacts = (Contact[])searchList[0];
System.debug('Found the following contacts:');
for (Contact c : searchContacts) {
   System.debug('"'+c.LastName + ', ' + c.FirstName+'"');
}

But still there's an error when I check the challenge.

Challenge Not yet complete... here's what's wrong: 
Could not find the contact's name in the debug log. Be sure to run a query for your record, and to write your contact's name to the debug log using the System.debug() method.
reference error id: DPFVJULB 

All modules (before and after this one) verify fine!  The flow works perfectly.  However, this one will not verify...I get an error that tells me to try it in a new DE.  I hate to start over and get the same issue when everything around it works fine.  Is it just me?
Create a Visualforce page without the standard Salesforce header and display an image using the Visualforce image component.
The page must be named 'DisplayImage'.
It must NOT display the standard Salesforce header.
It must use a Visualforce apex:image component to display this image - https://developer.salesforce.com/files/salesforce-developer-network-logo.png

<apex:page showHeader="false" title='DisplayImage'> 
    <apex:pageBlock >
        <apex:image url="https://developer.salesforce.com/files/salesforce-developer-network-logo.png"/>
    </apex:pageBlock> 
</apex:page>

Challenge Not yet complete... here's what's wrong: 
The 'DisplayImage' page was not found.
I have written this class for the Trailhead challenge. I am able to find that the account gets inserted but,still I am unable to complete the challenge.Its showing the error "Executing the 'insertNewAccount' method failed. Either the method does not exist, is not static, or does not insert the proper account." Can anyone please help?

public with sharing class AccountHandler {
    public static ID insertNewAccount(String str){
        try{
            Account acc=new Account(Name='CENA');
            insert acc;      
            return(acc.Id);
            
        }
        catch(DMLException ex){
            system.debug('Error Message thrown::'+ex.getMessage());
            return(null);
            
        }
    }
}