• MANOJ CHAUHAN 1
  • NEWBIE
  • 10 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 4
    Replies
Hi there, 

I got following error on step 3.

A Volunteer Shift Worker record created for another user is not in their approval queue, or it does not have the correct status automatically assigned.

Anyone passed this step?

Thanks
LinThaw
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);
            
        }
    }
}
Hello,

I alway get error "Challenge not yet complete... here's what's wrong: 
Executing the 'searchForContacts' method failed. Either the method does not exist, is not static, or does not return the expected contacts."

I have my code as following:
public class ContactSearch {
    public List<Contact> searchForContacts (String cName, String pCode) {
        
        List<Contact> matchCon = [SELECT Id, First_Name__c, Last_Name__c, MailingPostalCode__c FROM Contact
                                  WHERE Last_Name__c = 'cName'
                                  AND MailingPostalCode__c = 'pCode']; 
        
        if(matchCon.size() > 0){
            return matchCon;
        } else {
            return null;
        }
    }
}

Kindy check and tell me what is wrong

thank in advance

Visal