• Amit Karlekar 3
  • NEWBIE
  • 0 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
public class createNewAccount {
    
    public Contact createAcc(string conName){
        
        account acc = new account();
        acc.Name = conName;
        insert acc;
        system.debug(acc);
        
        contact con = new contact contact();
        con.LastName = conName + 'Contact';
        con.AccountId = acc.Id
        insert con;
        system.debug(con);
        
        return Contact;
    }

}

this is the program in which I couldn't find the error. Can somebody please help me?