• krishna reddy Singampalli
  • NEWBIE
  • 15 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 6
    Replies
public class DML {
    public Account acc {set;get;}
    public Contact con {set;get;}
    public DML(){
        acc=new Account();
        con=new Contact();
    }
    public void create (){
        insert acc;
        con.accountId=acc.Id;
        insert con;
    }
}
public class Soql_Example {
    public List<Account> accounts {set;get;}
    
    public Soql_Example(){
        accounts=[select name,phone,rating,industry from Account];
        
    }
 
public class MyAccount {
    public String name {set;get;}
    public String phone {set;get;}
    public String rating {set;get;}
    public void create(){
        Account acc=new Account();
        acc.name=name;
        acc.phone=phone;
        acc.rating=rating;
  10)       insert acc;
    }
    
}
public class Soql_Example {
    public List<Account> accounts {set;get;}
    
    public Soql_Example(){
        accounts=[select name,phone,rating,industry from Account];
        
    }
 
public class MyAccount {
    public String name {set;get;}
    public String phone {set;get;}
    public String rating {set;get;}
    public void create(){
        Account acc=new Account();
        acc.name=name;
        acc.phone=phone;
        acc.rating=rating;
  10)       insert acc;
    }
    
}