You need to sign in to do that
Don't have an account?
Neha Sharma 342
classs
public class LeadHelper
{
public void createNewLeadRecord()
{
Lead ld = new Lead ();
ld.FirstName = 'Test';
ld.LastName ='Lead record';
ld.Company = 'google';
ld.Status = 'OPen - Not contacted';
ld.Rating = 'HOt';
ld.Industry = 'Banking';
ld.AnnualRevenue = 4500000;
ld.Phone = '6765434567';
ld.Fax = '6776543456789';
ld.Email = 'sample@gmail.com';
ld.LeadSource ='web';
ld.website = 'www.salesforce.com';
ld.city = 'Hyderabad';
ld.Country = 'india';
insert ld;
if(ld.id != null)
system.debug('lead record inserted with id .....:'+ld.id);
}
}
execution
LeadHelper ldHelper = new LeadHelper();
ldHelper.createtNewLeadRecord();
Line: 3, Column: 10 Method does not exist or incorrect signature: void createtNewLeadRecord() from the type LeadHelpe
classs
public class LeadHelper
{
public void createNewLeadRecord()
{
Lead ld = new Lead ();
ld.FirstName = 'Test';
ld.LastName ='Lead record';
ld.Company = 'google';
ld.Status = 'OPen - Not contacted';
ld.Rating = 'HOt';
ld.Industry = 'Banking';
ld.AnnualRevenue = 4500000;
ld.Phone = '6765434567';
ld.Fax = '6776543456789';
ld.Email = 'sample@gmail.com';
ld.LeadSource ='web';
ld.website = 'www.salesforce.com';
ld.city = 'Hyderabad';
ld.Country = 'india';
insert ld;
if(ld.id != null)
system.debug('lead record inserted with id .....:'+ld.id);
}
}
execution
LeadHelper ldHelper = new LeadHelper();
ldHelper.createtNewLeadRecord();
There is a typo error in below line: (am seeing the extra t )
ldHelper.createtNewLeadRecord(); ==> ldHelper.createNewLeadRecord();
Execute the below code :
Thanks,
Maharajan.C
Hi,
there is no need to make the object of class LeadHelper
just call the method as the below
or
Please mark it as the Best Answer if it helps you
you did simply mistake to adding extry t in this ldHelper.createtNewLeadRecord();
try below code. let me know if it helps you and don't forget to mark it as best answer.
Thank you