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
gokubigokubi 

An AJAX S-Control for importing opportunities

Here's a simple S-Control that allows for the importing of closed Opportunities. It requires manual User steps for importing the Opportunites as Leads via the Sforce Data Loader. Then, the S-Control converts those Leads to Opportunites and addresses some of the limitations in the Lead Conversion functionality in sf.com.



In addition to the standard Lead Conversion functionality, this S-Control sets the Close Date and Amount for an Opportunity. It also allows you to set the OpportunityContactRole for the Contact.



I have built this for importing donations that a nonprofit has received via PayPal or some other service, but I wanted to share it as I didn't find many examples of AJAX lead conversion while I was working on it.



The code deals with:



The LeadConverts object and the ConvertLeadResult object. I also use the OpportunityContactRole dynabean, another code snip for which I couldn't find AJAX examples.



Any feedback is welcome as I'm no expert in Javascript or S-Control development.



Steve, steve@onenw.org
gokubigokubi
I created a couple screen capture flash movies of this S-Control in action, and the steps for getting the S-Control and supporting process set up.



Though they might be of interest to folks, especially people just getting up and running with the AJAX toolkit.



Steve