如何在SugarCRM中的view.popup中自定义查询 [英] How I can customize query in view.popup in SugarCRM

查看:130
本文介绍了如何在SugarCRM中的view.popup中自定义查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用SugarCRM 6.7,我想在弹出窗口中自定义listview查询.打开案例"模块中的帐户"弹出窗口时,需要一个自定义查询.

I am are using SugarCRM 6.7, I wanna customize the listview query in popup. I need a custom query when I open the Accounts popup in Cases module.

我在\ custom \ modules \ Accounts \ views \ view.popup.php中创建了一个文件

I was created a file in \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"相等,但是没有成功.

But I need change the initial query, I tried to use $this->where = "whereCondition" equal in view.list.php but with no success.

如何更改view.popup中的初始查询?谢谢

How I can, change the initial query in view.popup? Thank you

推荐答案

这是一种在SugarCRM中自定义popup(view.popup.php)内部sql查询的方法.

This is a way to customize the sql queries inside the popup( view.popup.php ) in SugarCRM.

在\ custom \ modules \<中创建一个名为view.popup.php的文件.模块> \ views 与此:

Create a file called view.popup.php in \custom\modules\< module >\views with this:

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中的view.popup中自定义查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆