• Hunter Akers
  • NEWBIE
  • 20 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
Here is the code that i have written:

public class AccountHandler {
    public Static Account insertNewAccount(String AccountName)
    {
        Account acc=new Account(name=AccountName)
        Database.SaveResult[] saveResultList = Database.insert(acc,false);
    }

}

Is it the right solution?, If yes please suggest me what is the execution code for this solution.
public class ContactAndLeadSearch {
public static List<List<SObject>> searchContactsAndLeads(string FN)
{
    List<List<sObject>> searchList = [FIND 'FN' IN all fields 
RETURNING Contact(FirstName,LastName) ,Lead(FirstName,Lastname)];
//Contact[] searchContacts = (Contact[])searchList[0];
//Lead[] searchLeads = (Lead[])searchList[1];
return searchList;
   

}
}

Please someone correct this code ,, this one was nt fulfilling the challenge req.
hi
i am new to salesforce platform.
Install a simple Apex class, write unit tests that achieve 100% code coverage for the class, and run your Apex tests.The Apex class to test is called 'VerifyDate', and the code is available here. Copy and paste this class into your Developer Edition via the Developer Console.
'VerifyDate' is a class which tests if a date is within a proper range, and if not will return a date that occurs at the end of the month within the range.
The unit tests must be in a separate test class called 'TestVerifyDate'.
The unit tests must cover scenarios for all lines of code included in the Apex class, resulting in 100% code coverage.
Run your test class at least once (via the Developer Console) before attempting to verify this challenge.

In the above challege i am not able to write a 'TestVerifyDate' class. I dont unsertstand how to write it for a date.
plz help..