Results 1 to 2 of 2

Thread: Problem with account subpanel

  1. #1
    holyfire is offline Sugar Community Member
    Join Date
    May 2007
    Posts
    43

    Default Problem with account subpanel

    Hi,

    I would like to add more than one subpanel in account view with a duplicated module, but when i installed a new duplicated module, it erased account subpanel without keep the original account subpanel :-/

    it seems to replaced few arrays of the original subpanel but I changed every word in duplicated declaration

    i don't know what i have to modify, if someone could help me please

    Thanks in advance,
    Alexandre A.

    here are the definition of original and duplicated module for account subpanel:

    Module InvPostes
    accounts_invpostevardefs.php

    PHP Code:
    $dictionary['Account']['fields']['invpostes'] = array (
        
    'name' => 'invpostes',
        
    'type' => 'link',
        
    'relationship' => 'account_invposte',
        
    'module' => 'InvPostes',
        
    'source'=>'non-db',
        
    'vname'=>'LBL_INVPOSTE_SUBPANEL_TITLE',
    ); 
    accountlayout_invpostedefs.php

    PHP Code:
    $layout_defs['Accounts']['subpanel_setup']['invpostes'] =  array(
                
    'order' => 120,
                
    'module' => 'InvPostes',
                
    'subpanel_name' => 'ForAccount',
                
    'get_subpanel_data' => 'invpostes',
                
    //'add_subpanel_data' => 'account_id',
                
    'title_key' => 'LBL_INVPOSTE_SUBPANEL_TITLE',
                
    'refresh_page'=>1,
                
    'sort_order' => 'desc',
                
    'sort_by' => 'name',
                
    'top_buttons' => array(
                array(
    'widget_class' => 'SubPanelTopButtonQuickCreate'),
                array(
    'widget_class' => 'SubPanelTopSelectButton''popup_module' => 'InvPostes'),
                ),
    ); 
    accounts_invposteMetaData.php

    PHP Code:
    $dictionary['accounts_invpostes'] = array (
        
    'table' => 'accounts_invpostes'
        
    'fields' => array (
            array(
    'name' =>'id''type' =>'char''len'=>'36''required'=>true'default'=>'')
          , array(
    'name' =>'account_id''type' =>'char''len'=>'36')
          , array(
    'name' =>'invposte_id''type' =>'char''len'=>'36')
          , array (
    'name' => 'date_modified','type' => 'datetime')
          , array(
    'name' =>'deleted''type' =>'bool''len'=>'1''required'=>true'default'=>'0')
        ),
        
    'indices' => array (
            array(
    'name' =>'accounts_invpostespk''type' =>'primary''fields'=>array('id')),
            array(
    'name' =>'accounts_idx''type' =>'index''fields'=>array('account_id')),
            array(
    'name' =>'invposte_idx''type' =>'index''fields'=>array('invposte_id')), 
            array(
    'name' =>'acc_invp''type' =>'alternate_key''fields'=>array('account_id','invposte_id'))
        ),
        
    'relationships' => array (
                                    
    'accounts_invpostes' => 
                                    array(
                                    
    'lhs_module'=> 'Accounts',
                                    
    'lhs_table'=> 'accounts',
                                    
    'lhs_key' => 'id',
                                    
    'rhs_module'=> 'InvPostes',
                                    
    'rhs_table'=> 'invpostes_table',
                                    
    'rhs_key' => 'client_id',
                                    
    'relationship_type'=>'many-to-many',
                                    
    'join_table'=> 'accounts_invpostes',
                                    
    'join_key_lhs'=>'account_id',
                                    
    'join_key_rhs'=>'invposte_id'))
    ); 
    Module InvServeurs
    accounts_invserveurvardefs.php

    PHP Code:
    $dictionary['Account']['fields']['invserveurs'] = array (
        
    'name' => 'invserveurs',
        
    'type' => 'link',
        
    'relationship' => 'account_invserveur',
        
    'module' => 'InvServeurs',
        
    'source'=>'non-db',
        
    'vname'=>'LBL_INVSERVEUR_SUBPANEL_TITLE',
    ); 
    accountlayout_invserveurdefs.php

    PHP Code:
    $layout_defs['Accounts']['subpanel_setup']['invserveurs'] =  array(
                
    'order' => 120,
                
    'module' => 'InvServeurs',
                
    'subpanel_name' => 'ForAccount',
                
    'get_subpanel_data' => 'invserveurs',
                
    //'add_subpanel_data' => 'account_id',
                
    'title_key' => 'LBL_INVSERVEUR_SUBPANEL_TITLE',
                
    'refresh_page'=>1,
                
    'sort_order' => 'desc',
                
    'sort_by' => 'name',
                
    'top_buttons' => array(
                array(
    'widget_class' => 'SubPanelTopButtonQuickCreate'),
                array(
    'widget_class' => 'SubPanelTopSelectButton''popup_module' => 'InvServeurs'),
                ),
    ); 
    accounts_invserveurMetaData.php

    PHP Code:
    $dictionary['accounts_invserveurs'] = array (
        
    'table' => 'accounts_invserveurs'
        
    'fields' => array (
            array(
    'name' =>'id''type' =>'char''len'=>'36''required'=>true'default'=>'')
          , array(
    'name' =>'account_id''type' =>'char''len'=>'36')
          , array(
    'name' =>'invserveur_id''type' =>'char''len'=>'36')
          , array (
    'name' => 'date_modified','type' => 'datetime')
          , array(
    'name' =>'deleted''type' =>'bool''len'=>'1''required'=>true'default'=>'0')
        ),
        
    'indices' => array (
            array(
    'name' =>'accounts_invserveurspk''type' =>'primary''fields'=>array('id')),
            array(
    'name' =>'accounts_idx''type' =>'index''fields'=>array('account_id')),
            array(
    'name' =>'invserveur_idx''type' =>'index''fields'=>array('invserveur_id')), 
            array(
    'name' =>'acc_invp''type' =>'alternate_key''fields'=>array('account_id','invserveur_id'))
        ),
        
    'relationships' => array (
                                    
    'accounts_invserveurs' => 
                                    array(
                                    
    'lhs_module'=> 'Accounts',
                                    
    'lhs_table'=> 'accounts',
                                    
    'lhs_key' => 'id',
                                    
    'rhs_module'=> 'InvServeurs',
                                    
    'rhs_table'=> 'invserveurs_table',
                                    
    'rhs_key' => 'client_id',
                                    
    'relationship_type'=>'many-to-many',
                                    
    'join_table'=> 'accounts_invserveurs',
                                    
    'join_key_lhs'=>'account_id',
                                    
    'join_key_rhs'=>'invserveur_id'))
    ); 

  2. #2
    holyfire is offline Sugar Community Member
    Join Date
    May 2007
    Posts
    43

    Talking Re: Problem with account subpanel

    UP, is there someone who had the same problem please ?

    EDIT: I found my problem that was the argument of 'order' in Layout Definition
    Last edited by holyfire; 2007-06-27 at 07:07 AM. Reason: Found my problem

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: 2006-10-28, 04:34 AM
  2. Problem with creating a custom subpanel
    By Skipidar in forum Developer Help
    Replies: 0
    Last Post: 2006-10-14, 08:10 AM
  3. problem with subpanel
    By fredouil in forum General Discussion
    Replies: 2
    Last Post: 2006-09-19, 10:14 AM
  4. Odd problem with Account Name searching
    By CyberFerret in forum Help
    Replies: 1
    Last Post: 2006-04-14, 10:32 PM
  5. Replies: 0
    Last Post: 2005-12-21, 03:12 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
  •