• Kiran M 51
  • NEWBIE
  • 5 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Someone can tell me why im getting this error? Its seems a good code for me.

public class AccountHandler {
    public static Account insertNewAccount (String Nome){
        try
        {
               Account acct = new Account();
            acct.Name = Nome;
            insert acct;
            return acct;
        } catch (DmlException e){
            System.debug('A DML exception has ocurred: '+ e.getMessage());
            return null;
        }
    }
}