Results 1 to 10 of 10

Thread: what setting to make converted leads not show in listview

  1. #1
    ptemplin7 is offline Sugar Community Member
    Join Date
    Jun 2007
    Location
    Puget Sound Washington
    Posts
    380

    Default what setting to make converted leads not show in listview

    IS there a way to make this upgrade safe?

    What we need is to not have the converted leads show. Which file needs to be changed to make converted leads not show in listview

    STill using 5.1b Linux based.

    Thanks ahead of time.

    PAris

  2. #2
    nirmit is offline Senior Member
    Join Date
    Aug 2008
    Posts
    42

    Default Re: what setting to make converted leads not show in listview

    Paris,

    I believe a custom view logic should help you.

    Just create a file in custom/modules/Leads/views and name is view.list.php
    The file would look like this:
    Code:
    <?php
    require_once('include/json_config.php');
    require_once('include/MVC/View/views/view.list.php');
    
    class TimesheetViewList extends ViewList {
       
        function TimesheetViewList(){
            parent::ViewList();
        }
        
        function preDisplay(){
            parent::preDisplay();
            /* ADD YOUR CUSTOM CODE HERE */
        }
    }  
    ?>
    Hope it helps!
    -------------------------------------------------------
    Nirmit Bothra
    http://twitter.com/nirmit

  3. #3
    crmsiva's Avatar
    crmsiva is offline A Sugar Hero
    Join Date
    Jan 2009
    Location
    Chennai, India
    Posts
    1,130

    Default Re: what setting to make converted leads not show in listview

    Put this view.list.php file inside "custom\modules\Leads\views" folder. This will filter the converted leads from displaying in the listview.

  4. #4
    ptemplin7 is offline Sugar Community Member
    Join Date
    Jun 2007
    Location
    Puget Sound Washington
    Posts
    380

    Default Re: what setting to make converted leads not show in listview

    Thanks for the suggestions.

    Will try them and see.

    Thanks again,
    Paris

  5. #5
    ptemplin7 is offline Sugar Community Member
    Join Date
    Jun 2007
    Location
    Puget Sound Washington
    Posts
    380

    Default Re: what setting to make converted leads not show in listview

    Found a bug in this script. Had to comment out line 228.
    Referred to a a process called processQuickSearch. This caused an error. Otherwise things are working great!

    Thanks again, Paris

  6. #6
    crmsiva's Avatar
    crmsiva is offline A Sugar Hero
    Join Date
    Jan 2009
    Location
    Chennai, India
    Posts
    1,130

    Default Re: what setting to make converted leads not show in listview

    Thanks for your feedback

  7. #7
    ptemplin7 is offline Sugar Community Member
    Join Date
    Jun 2007
    Location
    Puget Sound Washington
    Posts
    380

    Question Re: what setting to make converted leads not show in listview

    OK,

    Had to remove the file completely. The suggested file breaks Sugar 5.2a for users who are not Administrators.

    First the Select button disappears, and then you are not able to get past the first page of your search. The next button does nothing.

    NOTE, when I commented out the !is_admin if statements and made everyone admin fro the script. The select button comes back and works but clicking the next button give you the list 31 - 30 out of 30. So obviously something is broken.

    Any suggestions on how to fix this. IOmplemented but the office staff just started using the Leads again so didn't find this until now.

    Thanks ahead of time for suggestions and code.

    Paris

  8. #8
    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: what setting to make converted leads not show in listview

    A work around:

    1. Create a custom controller for Leads module: custom/modules/Leads/controller containing the function action_listview:

    PHP Code:
    <?PHP
    require_once('include/MVC/Controller/SugarController.php');
    require_once(
    'custom/modules/Leads/LeadListView.php');

    class 
    LeadssController extends SugarController {
        function 
    action_listview(){
            
    $this->view 'list';
            
    $GLOBALS['view'] = $this->view;
            
    $this->bean = new LeadListView();
        }
    }
    ?>
    2. Create the script custom/modules/Leads/LeadListView.php which contains a class which extends the default Lead module class:

    PHP Code:
    <?php
    if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

    class 
    LeadListView extends Lead {
        function 
    LeadListView() {
            
    parent::Lead();
        }
        
        function 
    create_new_list_query($order_by$where$filter = array(), $params = array(), $show_deleted 0$join_type ''$return_array false$parentbean$singleSelect false) {
            
    $ret_array parent::create_new_list_query($order_by$where$filter$params$show_deleted$join_type$return_array$parentbean$singleSelect);
            
    $ret_array['where'].= " AND leads.converted = 0";

            return 
    $ret_array;
        }
    }
    ?>
    Kind regards
    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.

  9. #9
    ptemplin7 is offline Sugar Community Member
    Join Date
    Jun 2007
    Location
    Puget Sound Washington
    Posts
    380

    Smile Re: what setting to make converted leads not show in listview

    Thanks Andre,

    Was kind of hoping for something like this. Will give it a shot and let you know of any problems. Knew what I needed to do just not exactly how to go about it after the other script failed.

    Thanks again,
    Paris

  10. #10
    ptemplin7 is offline Sugar Community Member
    Join Date
    Jun 2007
    Location
    Puget Sound Washington
    Posts
    380

    Default Re: what setting to make converted leads not show in listview

    Well tried your suggestion,

    No joy. Got it added even tried putting in the views folder.

    What happens is no complaints in the log. But end up with Blank screen. Did we do something wrong? Tried reloading but still end up with completely blank page.

    Suggestions?

    Thanks Paris

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How can I omit converted leads in list view?
    By bvictoria06 in forum Help
    Replies: 1
    Last Post: 2007-05-18, 12:18 AM
  2. Replies: 1
    Last Post: 2007-01-17, 08:10 PM
  3. Explain the status converted in leads
    By seeni2006 in forum Help
    Replies: 1
    Last Post: 2006-11-30, 04:02 AM
  4. Replies: 5
    Last Post: 2005-03-16, 01:47 PM
  5. Replies: 0
    Last Post: 2005-01-28, 08:01 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
  •