Giter Club home page Giter Club logo

leadconvert's Introduction

There are a number of “Black Box” processes in Salesforce that are essentially hardcoded functions that you have little or no control over. The out-of-the-box Lead Conversion process is one of these Black Box processes – when you click the standard ‘Convert’ button from a Lead record, you get redirected to a page called leadconvert.jsp.

While the standard page used for lead conversion is good enough most of the time for most customers, you may eventually find yourself asking, “How do I customize the Convert Lead screen?

We figured the Salesforce community would get value from a customizable lead conversion page and process, so we built one by recreating the Convert Lead page using Visualforce, Javascript, and Apex.

What are the use cases for a custom Convert Lead page for converting Salesforce leads?

  • Include additional Opportunity, Account or Contact fields when converting a Lead
  • Hide fields on the Convert Lead page
  • Prevent users from creating new Opportunities when converting a Lead
  • Remove the Task fields from the Convert Lead page
  • Include additional custom buttons on the Convert Lead page
  • Add or remove sections and manage the style and formatting of the Convert Lead page
  • Implement custom or complex field mapping logic
  • Map Lead fields to multiple fields on the converted Opportunity, Account or Contact
  • Select an Account or Opportunity Record Type when converting a Lead
  • Redirect to a different object or screen after converting a Lead
  • Include a custom update on the Chatter feeds for converted records
  • Add Products to Opportunities at the time of lead conversion
  • Include logic to set default options and values when converting Leads
  • Copy Lead field values to custom objects upon conversion

How does the custom Convert Lead page work?

We studied how the standard Salesforce Lead conversion process worked from end-to-end, and built an exact replica of the Convert Lead page using Visualforce and Apex. The result is an unmanaged package of Apex classes, custom Visualforce components, and a Visualforce page that you can use as a starting point for customizing the lead conversion process to the exact requirements of your business users.

The Convert Lead unmanaged package contains the following components:

Visualforce Page
  • leadConvertPage – The Visualforce page that replicates the standard Convert Lead page and uses the Standard Controller for the Lead sObject
Visualforce Components
  • leadConvertCoreComponent – Visualforce component containing the core UI elements for the Visualforce page
  • leadConvertTaskDescriptionComponent – Visualforce component containing UI elements related to the Task Description
  • leadConvertTaskInfoComponent – Visualforce component containing UI elements related to the common Task fields
  • leadConvertPageHeaderTextComponent – Visualforce component containing text that appears at the top of the Visualforce page
Apex Classes
  • ComponentControllerBase – Core Visualforce component controller
  • DateTimeUtility – Utility class containing Date / Time functions
  • leadConvertController – Visualforce controller extension
  • leadConvertCoreComponentController – Controller for the leadConvertCoreComponent Visualforce component
  • leadConvertTaskDescComponentController – Controller for the leadConvertTaskDescriptionComponent Visualforce component
  • leadConvertTaskInfoComponentController – Controller for the leadConvertTaskInfoComponent Visualforce component
  • PageControllerBase – Helper class to manage communications between the Visualforce page and components
  • TestLeadConvertPage – Unit tests for all Apex classes in the Convert Lead package

How do I use the custom Convert Lead page?

Implementing the custom Visualforce page is straightforward. You can choose to use either a standalone Custom Button (an example is included in the package) or overwrite the standard Convert button on the Lead object.

To use the Custom Button, simply drag it onto the desired Page Layouts from the Page Layout editor and optionally remove the standard Convert button from the page.

To override the standard Convert button, navigate to ‘Buttons, Links, and Actions’ in the Customize options for the Lead object. Click the ‘Edit’ link next to the Convert button, set the ‘Override With’ option to ‘Visualforce Page,’ and select the ‘leadConvertPage’ Visualforce page from the dropdown menu.

leadconvert's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.