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
citeitciteit 

Procedurally generate link to convert lead page?

Is there a way via the API to generate the URL used to convert a lead? For instance, I know this URL looks like (for my account):

https://na5.salesforce.com/lead/leadconvert.jsp?retURL=%2F00Q7000000JNTGS&id=00Q7000000JNTGS

Secondly, can this page be loaded with just the convert lead UI, and not with the standard Salesforce tabs? Ideally it will be launched in popup from my application.
werewolfwerewolf
Why would you try to use this page rather than just calling the convertLead verb via the API?
citeitciteit
Unfortunately, because I was asked to.
werewolfwerewolf
Well answer "no" then.  You're not going to be able to get that URL via the API, and besides, it's not guaranteed to stay a JSP as it is, so if you hardcode the URL you may well be setting yourself up for trouble later.  If you can access the API anyway, there's no reason why you wouldn't just use the API's convertLead function, which is guaranteed not to change.