• Tim Ihlenfeld
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
Here's the error I'm getting:
"Challenge Not yet complete... here's what's wrong: 
There was an unexpected error in your org which is preventing this assessment check from completing: System.NullPointerException: Attempt to de-reference a null object"

and here is the code I'm using:
public class AccountHandler {
    public static Account insertNewAccount(String accountName){
        try{
            Account newAccount = new Account(Name=accountName);
                insert newAccount;
                return newAccount;

            }
        catch (exception e){
                return null;
            }
    }
}
 
Here's the error I'm getting:
"Challenge Not yet complete... here's what's wrong: 
There was an unexpected error in your org which is preventing this assessment check from completing: System.NullPointerException: Attempt to de-reference a null object"

and here is the code I'm using:
public class AccountHandler {
    public static Account insertNewAccount(String accountName){
        try{
            Account newAccount = new Account(Name=accountName);
                insert newAccount;
                return newAccount;

            }
        catch (exception e){
                return null;
            }
    }
}