我正在使用SugarCRM 6.7,我想在弹出窗口中自定义listview查询.当我打开Cases模块中的Accounts弹出窗口时,我需要一个自定义查询.
我在\ 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();
}
}
Run Code Online (Sandbox Code Playgroud)
但是我需要更改初始查询,我试图在view.list.php中使用$ this-> where ="whereCondition"等于但没有成功.
我怎么样,在view.popup中更改初始查询?谢谢
这是一种在SugarCRM中自定义弹出窗口(view.popup.php)中的sql查询的方法.
使用以下命令在\ custom\modules\<module>\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();
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3850 次 |
| 最近记录: |