• ramesh puthala manohara reddy
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
This is my code:
public class AccountHandler {

    public static Account insertNewAccount(String name){
        try{
            Account acc = new Account();
            acc.Name = name ; 
            insert acc ; 
            system.debug(acc.Id);
            return acc;
            
        }catch (DmlException e) {
           System.debug('A DML exception has occurred: ' + e.getMessage());
           return null; 
        }
    }
}