You need to sign in to do that
Don't have an account?
masthan khan
Line: 1, Column: 8 Invalid constructor syntax, name=value pairs can only be used for SObjects: Lead
Hai,
Iam Getting following error:
Line: 1, Column: 8
Invalid constructor syntax, name=value pairs can only be used for SObjects: Lead
Lead l=new Lead(lastname='Ch',FirstName='Satish',Company='Capital',leadSource='Web');
insert l;
Database.LeadConvert lc =new Database.LeadConvert();
lc.setLeadId(l.id);
LeadStatus stat= [select id,MasterLabel from LeadStatus where isConverted=true];
lc.setConvertedStatus(stat.MasterLabel);
Database.convertLead(lc);
With Regards
Masthan
Iam Getting following error:
Line: 1, Column: 8
Invalid constructor syntax, name=value pairs can only be used for SObjects: Lead
Lead l=new Lead(lastname='Ch',FirstName='Satish',Company='Capital',leadSource='Web');
insert l;
Database.LeadConvert lc =new Database.LeadConvert();
lc.setLeadId(l.id);
LeadStatus stat= [select id,MasterLabel from LeadStatus where isConverted=true];
lc.setConvertedStatus(stat.MasterLabel);
Database.convertLead(lc);
With Regards
Masthan
Thanks,
Prady01
so try this code,
Hope it might help you.
Thanks
Akshay