You need to sign in to do that
Don't have an account?
Tim Ihlenfeld
Error on "Manipulate Records with DML" Trailhead
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;
}
}
}
"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;
}
}
}
Sorry for this issue you are encountering.
May I suggest you please try with below piece of code which works fine for me. Hope this helps.
Kindly mark this as solved if the reply was helpful so that it gets removed from the unanswered queue which results in helping others who are encountering a similar issue.
Thanks,
Nagendra
All Answers
Sorry for this issue you are encountering.
May I suggest you please try with below piece of code which works fine for me. Hope this helps.
Kindly mark this as solved if the reply was helpful so that it gets removed from the unanswered queue which results in helping others who are encountering a similar issue.
Thanks,
Nagendra
"
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
"
Thanks for your help!