Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: How do I put a "Convert Lead" button in a new module?

  1. #1
    secant is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    12

    Default How do I put a "Convert Lead" button in a new module?

    Greetings to the forum!

    Apache version 2.2.6 (Unix)
    PHP version 5.2.5
    MySQL version 5.0.45-community
    Operating system Linux

    Sugar Version: CE 5.0.0c

    After creating a new module, I was hoping to place a button similar to "Convert Lead" in the leads module to my new module. The new module is mostly a basic person/contact module. This module is designed to be a private area for users to keep personal contacts away from the prying eyes of others using the database. So, often these personal contacts will develop into 'Business Contacts" and I was hoping to place a button for easy conversion. I know that I can do a quick export/import and setup a custom mapping but I thought this might be easier.

    Anyone know how to get this accomplished?

    Any help will be greatly appreciated!!

  2. #2
    Join Date
    Feb 2007
    Location
    San Jose, CA
    Posts
    1,169

    Default Re: How do I put a "Convert Lead" button in a new module?

    Hi secant,

    I won't give you a technical answer, I'll give you a User answer:

    If I was using your system, there is no way I would put personal contacts into it. From a sales rep's point of view, his/her personal contacts, the "rolodex" if you will, are sacred and are kind of like a tradesman's tools. They're mine, I own them, when I leave my job you don't get them, I do.

    Now from a company standpoint, any business contacts belong to the business, so you get into interesting wars when a sales rep leaves (i.e.- the rep wants to take the company contacts with him when he leaves, and the company says "no way").

    The end result, from my observations of working in and around sales groups for years, are that reps have two contact lists... one that the company owns, and one that the reps own. The former lives in the CRM system and the latter lives on a spreadsheet or Outlook personal folder (PST) file.

    So my suggestion would be to ask your users if this is something they would want and use before building it. My guess is that they will tell you to direct your efforts and valuable time elsewhere.
    Susie Williams

  3. #3
    secant is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    12

    Default Still need help! ... How do I put a "Convert Lead" button in a new module?

    Hi Susie,

    Thank you fro your input ... and for the most part I agree ...

    Here is the rest of the story that you were not privy to knowing. We have already sat down to discuss how it would be nice to have our 'personal contacts' in the database but to limit access to the user/owner of the record. Since the Community Edition doesn't allow the possibility to restrict access at the record level, then the only option was to build a 'Personal Contacts' module. Another reason is because we want to be computer independent, so that everyone's contacts ... personal or business can be accessed from any web-based computer.

    The module is completed and working ... and the module is restricted to the user/owner to have exclusive rights to their personal contacts. Occasionally the personal contact will need to be converted to open access, thus the conversion from personal to business contact, so that when the contact gets assigned to a project then everyone can view it. Which is why the need for the convert lead button.

    In most cases the separate 'personal' module would not need to be built, because everyone could use contacts as their personal contacts and we could restrict access through roles and Leads could be open to public access. Unfortunately, the Leads will be used in a way that would not allow this business process to work. So the new module was needed.

    Susie, I believe that this has been thought out fairly well ... if I have missed something, please share your thoughts.


    NOW, I am still in need of 'how to' ... anybody out there able to help?

  4. #4
    Join Date
    Feb 2007
    Location
    San Jose, CA
    Posts
    1,169

    Default Re: How do I put a "Convert Lead" button in a new module?

    Thank you for the rest of the story! I just feel it my duty to make sure customizations are thought out, relevant, and usable. It sounds like you've done your due diligence to ensure that's the case.

    I'll leave it to others to answer the technical portion of your question, as I slide back in to my non-forum moderator role...
    Susie Williams

  5. #5
    mylo78 is offline Sugar Community Member
    Join Date
    Jan 2007
    Posts
    55

    Default Re: How do I put a "Convert Lead" button in a new module?

    bump.


    Anyone have anything to add on the technical level. I found a similar post http://www.sugarcrm.com/wiki/index.php?title=Model-View-Controller_(MVC) - it's too early in the work day to tackle it though. I'm collecting info for now, will work on in the evening.

    Cheers
    Mylo

  6. #6
    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: How do I put a "Convert Lead" button in a new module?

    Hi Mylo

    Take easy man.
    Everybody needs help and we help asap.

    have you already edited the modules/Leads/metadata/detailviewdefs.php?


    PHP Code:
                'buttons' => array (
                    
    'EDIT',
                    
    'DUPLICATE',
                    
    'DELETE',
                    array (
                        
    'customCode' => '<input title="{$MOD.LBL_CONVERTLEAD_TITLE}" accessKey="{$MOD.LBL_CONVERTLEAD_BUTTON_KEY}" type="button" class="button" onClick="document.location=\'index.php?module=Leads&action=ConvertLead&record={$fields.id.value}\'" name="convert" value="{$MOD.LBL_CONVERTLEAD}">'
                    
    ),
                    array (
                        
    'customCode' => '<input title="{$APP.LBL_DUP_MERGE}" accessKey="M" class="button" onclick="this.form.return_module.value=\'Leads\'; this.form.return_action.value=\'DetailView\';this.form.return_id.value=\'{$fields.id.value}\'; this.form.action.value=\'Step1\'; this.form.module.value=\'MergeRecords\';" type="submit" name="Merge" value="{$APP.LBL_DUP_MERGE}">'
                    
    ),
                    array (
                        
    'customCode' => '<input title="{$APP.LBL_MANAGE_SUBSCRIPTIONS}" class="button" onclick="this.form.return_module.value=\'Leads\'; this.form.return_action.value=\'DetailView\';this.form.return_id.value=\'{$fields.id.value}\'; this.form.action.value=\'Subscriptions\'; this.form.module.value=\'Campaigns\';" type="submit" name="Manage Subscriptions" value="{$APP.LBL_MANAGE_SUBSCRIPTIONS}">'
                    
    ),
                    
                ), 
    You will see the code above.

    You just have to copy the custom code for the ConvertLead button, change the necessary and points to a php script which will perform the specified action.

    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.

  7. #7
    mylo78 is offline Sugar Community Member
    Join Date
    Jan 2007
    Posts
    55

    Default Re: How do I put a "Convert Lead" button in a new module?

    I'll give it a shot this week,
    Obligado

  8. #8
    mylo78 is offline Sugar Community Member
    Join Date
    Jan 2007
    Posts
    55

    Default Re: How do I put a "Convert Lead" button in a new module?

    Would it be helpful to read up on the Smarty templating system?

  9. #9
    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: How do I put a "Convert Lead" button in a new module?

    Quote Originally Posted by mylo78
    Would it be helpful to read up on the Smarty templating system?

    Sorry.

    I didn't understand.

    Can you explain again?

    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.

  10. #10
    mylo78 is offline Sugar Community Member
    Join Date
    Jan 2007
    Posts
    55

    Default Re: How do I put a "Convert Lead" button in a new module?

    I was having a bit of trouble getting a convert lead button working.
    It's all good now though.
    I've only got the button there, not doing anything yet.


    1) Make the changes in th e modules/<MODNAME>/metadata/detailvardefs.php file as you instructed.
    2) Remove the cache/modules/<MODNAME> directory so the new script in (1) gets loaded.


    From now, it's up to a bit of reading code.


    The aim is to build a custom Prospects module - I'll start a new thread in the developer section.
    Thanks for your help so far Andres.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Module Builder
    By Olavo in forum Downloads
    Replies: 418
    Last Post: 2009-02-26, 06:36 AM
  2. Replies: 0
    Last Post: 2007-03-23, 12:58 PM
  3. New module, subpanels and Inbound Email
    By tomi3x in forum Developer Help
    Replies: 0
    Last Post: 2006-09-26, 10:03 AM
  4. How to put a user field with a select button or dropdown
    By sugarcare in forum Developer Help
    Replies: 1
    Last Post: 2006-05-01, 03:08 PM
  5. Still unable to edit fields in "convert lead"
    By extremesanity in forum Feature Requests
    Replies: 6
    Last Post: 2005-08-26, 02:07 AM

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
  •