function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Saurabh Kukreja 13Saurabh Kukreja 13 

Convert Lead into Opportunity in Local hybrid App

Hi Experts
I am creating a local Hybrid app(local HTML pages) using mobile SDK and forceTk  and one of the module has convertLead option but I am not getting any method or API which converts the Lead to opportunity account and Contact.
Can anyone help to guide what can be done to achieve this.
KaranrajKaranraj
Create your own apex REST webservice class which will convert the lead record into Account, Contact and Opportunity. Here is the sample code for writing the logic for converting lead process - http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_dml_convertLead.htm

Now you have created a custom REST API class (http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_rest_code_sample_basic.htm) which will convert your lead, now call your REST API class in your code to convert lead.
"/services/apexrest/yourRestClassName/leadId"

Thanks,
http://karanrajs.com