Establecer como favoritoPrashanthkumar Annarapu ha preguntado en #Apex9 mar 2022, 14:58i didnt get any errors in apex class but when i tried to execute in executeanynomous it shows like Method does not exist or incorrect signature: void createLeadrecords() from the type Messaginghelper it means what can u give me a proper solutionpublic class Messaginghelper{ public static void createLeadrecords() { List<Lead>lstleadrecords=new List<Lead>(); // first lead record Lead ld = new Lead(); ld.firstname='mahesh'; ld.LastName='Dharmarapu'; ld.Email='maheshdharmarapu@gmail.com'; ld.Rating='Hot'; ld.Industry='Technology'; ld.AnnualRevenue=50000000; ld.Company='Auto desk inc'; ld.status='Open-Not contacted'; ld.phone='9900990099'; ld.Fax='9900887766'; ld.City='Hyderabad'; ld.State='Telangana'; ld.Country='India'; ld.PostalCode='50038'; lstleadrecords.add(ld); //second lead record Lead ld1 = new Lead(); ld1.firstname='maheshwari'; ld1.LastName='Dharmarapu'; ld1.Email='maheshwaridharmarapu@gmail.com'; ld1.Rating='Warm'; ld1.Industry='Technology'; ld1.AnnualRevenue=60000000; ld1.Company='Auto desk inc'; ld1.status='Open-Not contacted'; ld1.phone='9900990099'; ld1.Fax='9900887766'; ld1.City='Hyderabad'; ld1.State='Telangana'; ld1.Country='India'; ld1.PostalCode='500039'; lstleadrecords.add(ld1); //Third Lead record Lead ld2 = new Lead(); ld2.firstname='Dinesh'; ld2.LastName='Dharmarapu'; ld2.Email='dineshdharmarapu@gmail.com'; ld2.Rating='Hot'; ld2.Industry='Technology'; ld2.AnnualRevenue=50000000; ld2.Company='Auto desk inc'; ld2.status='Open-Not contacted'; ld2.phone='9900990099'; ld2.Fax='9900887766'; ld2.City='Hyderabad'; ld2.State='Telangana'; ld2.Country='India'; ld2.PostalCode='50038'; lstleadrecords.add(ld2); if(!lstleadrecords.isempty()) { insert lstleadrecords; system.debug('Inserted lead records..:'+ld.id); } }}this is my apex class code Mostrar más4 respuestasOrdenarOrdenar por fechaOrdenar por más útilOrdenar por fechaCargar más comentarios...Prashanthkumar Annarapu10 mar 2022, 5:34if my class name DMLhelper can u tell me execution code for this apex class codeThank youAgregar un comentarioEscribir una respuesta...NegritaCursivaSubrayadoTachadoLista con viñetasLista numeradaAgregar vínculoBloque de códigoInsertar imagenAdjuntar archivosURL de vínculoCancelarGuardar0/9000Responder
Prashanthkumar Annarapu10 mar 2022, 5:34if my class name DMLhelper can u tell me execution code for this apex class codeThank you