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
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
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:
Hope it helps!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 */ } } ?>
Put this view.list.php file inside "custom\modules\Leads\views" folder. This will filter the converted leads from displaying in the listview.
Thanks for the suggestions.
Will try them and see.
Thanks again,
Paris
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
Thanks for your feedback
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
A work around:
1. Create a custom controller for Leads module: custom/modules/Leads/controller containing the function action_listview:
2. Create the script custom/modules/Leads/LeadListView.php which contains a class which extends the default Lead module class: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();
}
}
?>
Kind regardsPHP 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;
}
}
?>
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.
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
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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks