You need to sign in to do that
Don't have an account?
gokubi
ajax convertlead problem
i'm trying to do lead conversion from the ajax api. Here's my function:
I get this error:
Any thoughts on what I'm doing wrong?
UPDATE: I figured out I need to create a LeadConverts object to pass to ConvertLead. If anyone has a sample of this at their fingertips, I'd be much obliged. Thanks!
Thanks,
Steve
function convertlead(LeadID) {
//Convert lead
var qr = sforceClient.Query("Select Id From Lead Where Id = '" + LeadID + "'");
var lead = qr.records[0];
ContactID = sforceClient.ConvertLead(lead);
}
I get this error:
Error on line 384 of document https://sandbox.sforce.com/ajax/beta2/sforceclient.js: leadConverts.toSoap is not a function
Any thoughts on what I'm doing wrong?
UPDATE: I figured out I need to create a LeadConverts object to pass to ConvertLead. If anyone has a sample of this at their fingertips, I'd be much obliged. Thanks!
Thanks,
Steve
Message Edited by gokubi on 11-23-2005 06:57 AM
I met the same problem now.
It seems that ajax toolkit has no function to convert lead.
Different from Web Services API ,according to the manual office toolkit doesn't support ConvertLead API Call.
So I suggested my custome to create account,contact,opportunity with AJAX and use custome fields to identify whether a lead has been converted or not logically.
Steve