• Chin H.
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hi All, 

Method does not exist or incorrect signature: void insertNewAccount(String) from the type AccountHandler

This is the error with which i am struck from very long time.
 this is my code

public class AccountHandler {
    public Static Account insertNewAccount(String an){
        Account acc = new Account(name=an);
            try{
                insert acc;
                return acc;
            }
        catch(DMLException e){
            return null;

        }
    }
 

}

Debug :
Account acc = AccountHandler.insertNewAccount('Test Record');