HI,
I have a custom list view for Accounts that I use to filter Global team records out of list view. This is the code I have but it is only working for the admin user. When any other user log into the CRM no Accounts appear. Can someone tell me what is wrong
RdgsPHP Code:<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
require_once('include/MVC/View/views/view.list.php');
class AccountsViewList extends ViewList{
function AccountsViewList()
{
parent::ViewList();
}
/*
* Override listViewProcess with addition to where clause to exclude project templates
*/
function listViewProcess()
{
$this->processSearchForm();
// RETRIEVE ACCOUNTS WHERE THE TEAM IS NOT GLOBAL
if ($this->where != "")
$this->where .= ' and team_id != 1 ';
else
$this->where .= 'team_id != 1';
$this->lv->searchColumns = $this->searchForm->searchColumns;
if(!$this->headers)
return;
if(empty($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] == false)
{
$this->lv->setup($this->seed, 'include/ListView/ListViewGeneric.tpl', $this->where, $this->params);
$savedSearchName = empty($_REQUEST['saved_search_select_name']) ? '' : (' - ' . $_REQUEST['saved_search_select_name']);
echo get_form_header($GLOBALS['mod_strings']['LBL_LIST_FORM_TITLE'] . $savedSearchName, '', false);
echo $this->lv->display();
}
}
}
?>
Chris


LinkBack URL
About LinkBacks





Reply With Quote

Bookmarks