Results 1 to 2 of 2

Thread: Need Help in the custom module list views

  1. #1
    balasundar is offline Junior Member
    Join Date
    Feb 2011
    Posts
    1

    Default Need Help in the custom module list views

    Hello all,

    I have created custom module in sugarCRM. I need to create custom view for that custom module list view using custom query.

    For that process,inside cuatom module views folder i have created view.customlistmodule.php.

    I need to call customlistviewdefs.php inside view.customlistmodule.php and also need to call custom query for list view

    My code in view.customlistmodule.php. as follows:

    PHP Code:
    if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
    require_once(
    'include/MVC/View/views/view.list.php');



    class 
    Viewlistnewform extends ViewList {
        var 
    $type 'listnewform';
        var 
    $useForSubpanel false;
        var 
    $useModuleQuickCreateTemplate false;
        var 
    $showTitle true;

        function 
    Viewlistnewform() {    

            
    $this->lv->edit false;
            
    $this->lv->showMassupdateFields=false
            
    $this->lv->delete=false
            
    $this->lv->export=false;
            
    parent::ViewList();
                    
        }
        function 
    listViewPrepare() {
            
    $this->type "listnewform";        
            
    parent::listViewPrepare();        
        }    
        function 
    processSearchForm() { } 
    Please Help me if u know the answer.

  2. #2
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Need Help in the custom module list views

    Did you create a controller.php for this script and also implemented the method action_CustomListModule?
    Inside this function in controller (or any other function you will call through url) you can define a different bean for processing data:

    PHP Code:
    function action_CustomListModule() {
      
    $this->view 'customlistmodule';
      
    $this->bean = new SomeCustomBean();

    Regarding the custom view itself you have to implement the function preDisplay. See include/MVC/View/views/view.edit.php for reference.

    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 2011-05-16, 02:50 PM
  2. Replies: 1
    Last Post: 2009-07-06, 02:25 PM
  3. Adding custom module to detail and list views
    By vidtechsteve in forum Help
    Replies: 0
    Last Post: 2007-04-16, 08:59 PM
  4. Edit Views Should Follow List Views
    By JayL in forum Help
    Replies: 2
    Last Post: 2007-01-27, 03:41 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •