Results 1 to 5 of 5

Thread: Duplicate lead > contact functionality

  1. #1
    dante2010 is offline Member
    Join Date
    Feb 2009
    Posts
    17

    Default Duplicate lead > contact functionality

    I am using SugarCRM Community Edition v5.2.0a.

    I have created a custom module called "Customers". This module was based off the "person" module type within the module builder. I have made changes to make it display and collect the data I require.

    What I want to do now is create a second custom module called "Potential Customers". Within this I want to duplicate the functionality found in the leads / contacts modules, where you can convert a lead to a contact.

    Can anyone offer some help as to how I go about this?

  2. #2
    dante2010 is offline Member
    Join Date
    Feb 2009
    Posts
    17

    Default Re: Duplicate lead > contact functionality

    Anyone able to help? To at least tell me if this is possible?

  3. #3
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Duplicate lead > contact functionality

    Hi dante

    It is possible and not pretty difficult.

    Steps to do that:

    1. Create a new button "Convert Potential Customer" into "Potential Customers" DetailView, just like in the Leads module. Have a look at modules/Leads/metadata/detailview.php. Search for CovertLead;
    2. This button must redirect to Customers EditView and it must pass a parameter (convert = true) to to enable Customers module identifies the EditView layout is for a just converted Potential Customer;
    3. Create a controller for the Customer module and implement the function action_editview. Inside this function you need to retrieve from database the related Potential Customer and fill in the Customer fields the ones coming from Potential Customer.

    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  4. #4
    lowJack01 is offline Sugar Community Member
    Join Date
    Sep 2007
    Location
    Albuquerque, NM
    Posts
    86

    Default Re: Duplicate lead > contact functionality

    Ooh, interesting.

    Andre, would you please point me in the right direction to populate a custom field on lead conversion to an account?
    Thank you,

    Jackie Trent
    Independent Contractor
    Sugar - 5.0.0d, 5.0.0f
    PHP Version 5.1.6
    MySQL 5.0.58

  5. #5
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Duplicate lead > contact functionality

    Quote Originally Posted by lowJack01 View Post
    Ooh, interesting.

    Andre, would you please point me in the right direction to populate a custom field on lead conversion to an account?
    Hi Jackie

    Does this custom field exist in both Accounts and Leads?
    If yes SugarCRM automatically render in the Convert Lead page the custom fields at the bottom.
    If not you need to edit the file modules/Accounts/AccountFormBase.php and modify the function getWideFormBody.
    You will find the code:

    $form .= <<<EOQ

    Bellow is the code where all Accounts fields are being rendered, so you need to add the custom field into it.

    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 2008-08-19, 06:35 PM
  2. Lead Duplicate Check
    By gosugar in forum Downloads
    Replies: 5
    Last Post: 2008-05-14, 01:09 PM
  3. Replies: 4
    Last Post: 2007-05-29, 07:29 AM
  4. Replies: 0
    Last Post: 2005-10-21, 09:10 PM
  5. Replies: 0
    Last Post: 2005-01-18, 04:07 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •