我正在使用SugarCRM 6.7,我想在弹出窗口中自定义列表视图查询。当我打开案例模块中的账户弹出窗口时,我需要一个自定义查询。
我在''custom''modules''Accounts''views''view.popup.php 中创建了一个文件
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
class CustomViewPopup extends ViewPopup{
function CustomViewPopup(){
parent::ViewPopup();
}
}
但我需要更改初始查询,我尝试在view.list.php中使用$this->where="where Condition"equal,但没有成功。
如何更改view.popup中的初始查询?感谢
这是在SugarCRM的弹出窗口(view.popup.php)中自定义sql查询的一种方法。
在''custom''modules''<中创建名为view.popup.php的文件;模块>>视图这个:
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
class CustomAccountsViewPopup extends ViewPopup{
public function listViewProcess(){
parent::listViewProcess();
$this->params['custom_select'] = " CUSTOM SELEC";
$this->params['custom_from'] = "CUSTOM FROM";
$this->where .= " CUSTOM WHERE CONDITION";
}
function CustomAccountsViewPopup(){
parent::ViewPopup();
}
function preDisplay(){
parent::preDisplay();
}
}