Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class OppQueryvalues {
- public static void StoreConlistData(){
- List<Contact> clist = new List<Contact>();
- List<Opportunity> opplist = [SELECT name from Opportunity];
- for(opportunity opp: Opplist){
- contact con = new contact();
- con.lastName= opp.name;
- clist.add(con);
- }
- insert clist;
- system.debug('erty' +clist);
- }
- }
Add Comment
Please, Sign In to add comment