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
Dilyan DimitrovDilyan Dimitrov 

Custom Convert Lead Page and Lead Conversion Process Using Visualforce and Apex

Hi,

Because I'm new to VF could you please give an example how to create custom Convert Lead VF page and Lead Conversion Process and to integrate it in Salesforce?

To be more precise what I need to acheve:
1. Stop the process of converting Lead to Account.
2. Display message in the convert Lead to Account page that the respective Lead is not converted.
3. Set and Update the Lead.Status__c field to 'Existing Deal'.

Could you please advise how this can be achieved using VF?
pconpcon
I can give you some pointers as to how to convert leads in a trigger [1] (the concept is the same in a controller), but these forums are not meant for someone to write your code for you.  If you want someone to develop all of this for you, I suggest you look at the AppExchange [2] where you can find a developer looking to work on your project.

If once you have attempted this and you have some code you can share, please feel free to ask any specific questions you may have regarding any issues you have in your code.

[1] http://blog.deadlypenguin.com/blog/2014/07/23/intro-to-apex-auto-converting-leads-in-a-trigger/
[2] https://appexchange.salesforce.com/developers
Dilyan DimitrovDilyan Dimitrov
Ok, thank you for your answer. I am trying to create my own custom vf page and what I would like to know and could you please advise how to be able to get and copy the source of my current vf lead convert page and change only the part where the convert button is involved. The only customization I need is to change the functionality of the convert button? Could you please help and advise because I strive to achieve that for such a long time?
Dilyan DimitrovDilyan Dimitrov
What I need is the Apex class which is connected with convert Lead to Account page with the convert button functionality.  
pconpcon
You can see the current lead conver page if you load the developer console and open the page there.  Then you can create a new visualforce page and copy the source there and make your changes.  If you need to create a new controller, you will have to do this work in a development environment.  Even if this is purely a Visualforce page, I would still recommend doing this in a development environment.
Dilyan DimitrovDilyan Dimitrov
To be more precise what I need is to extend the leadConvert class and override the convert button funcionality.
Dilyan DimitrovDilyan Dimitrov
Could you please advise as well as include an example/code on how to extend the LeadConvert class and override the convert button functionality?
pconpcon
It sounds like you're looking for someone to write the code for this project. These forums are not meant for that; you'll want to post over on the AppExchange site [1] where you can match up with a developer looking to work on your project.  I will gladly help you if you try to write the code and run into any specific issues.

[1] https://appexchange.salesforce.com/developers