我如何在 SugarCRM 中自定义 view.popup 中的查询
How I can customize query in view.popup in SugarCRM
我正在使用 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 = "whereCondition" equal 但没有成功。
我怎样才能更改 view.popup 中的初始查询?谢谢
这是一种在 SugarCRM 中自定义弹出窗口 (view.popup.php) 中的 sql 查询的方法。
在 \custom\modules\\views 中创建一个名为 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();
}
}
我正在使用 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 = "whereCondition" equal 但没有成功。
我怎样才能更改 view.popup 中的初始查询?谢谢
这是一种在 SugarCRM 中自定义弹出窗口 (view.popup.php) 中的 sql 查询的方法。
在 \custom\modules\
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();
}
}