Results 1 to 1 of 1

Thread: Problem creating a subpanel

  1. #1
    pesadilla is offline Junior Member
    Join Date
    Nov 2006
    Posts
    2

    Thumbs up FIXED: Problem creating a subpanel

    FIXED: in vardefs.php adding
    'notes' =>
    array (
    'name' => 'notes',
    'type' => 'link',
    'relationship' => 'contratos_notes',
    'source'=>'non-db',
    'vname'=>'LBL_NOTES',
    ),




    Hello:

    i'm trying create a subpanel following subpanels of Cases and http://www.sugarcrm.com/wiki/index.p...nels_Explained

    but i have a problem.

    My layout_defs
    Code:
    $layout_defs['Contratos'] = array(
            // list of what Subpanels to show in the DetailView
            'subpanel_setup' => array(
                    'history' => array(
                            'order' => 30,
                            'sort_order' => 'desc',
                            'sort_by' => 'date_modified',
                            'title_key' => 'LBL_HISTORY_SUBPANEL_TITLE',
                            'type' => 'collection',
                            'subpanel_name' => 'history',   //this values is not associated with a physical file.
                            'module'=>'History',
                            
                            'top_buttons' => array(
                            array('widget_class' => 'SubPanelTopCreateNoteButton'),
                            array('widget_class' => 'SubPanelTopArchiveEmailButton'),
                array('widget_class' => 'SubPanelTopSummaryButton'),
                            ),
                            
                            'collection_list' => array(
                                    'notes' => array(
                                            'module' => 'Notes',
                                            'subpanel_name' => 'ForHistory',
                                            'get_subpanel_data' => 'notes',
                                    ),
                            )
                    ),
            ),
    );
    i got the error:
    Fatal error: Call to a member function getQuery() on a non-object in /var/www/SugarCRM/data/SugarBean.php on line 1753

    ok, if i change 'module' => 'Notes' for 'module' => 'History'
    the error is:

    Warning: aSubPanel::require(modules/History/subpanels/ForHistory.php)

    this error is obviusly

    more information:

    vardefs:





    Code:
     'indices' => array(
                    array('name' =>'primary_key_index',
                            'type' =>'primary',
                            'fields'=>array('id')
                            ),
                    'contratos_notes' => array('lhs_module'=> 'Contratos', 'lhs_table'=> 'contratos', 'lhs_key' => 'id',
                                                              'rhs_module'=> 'Notes', 'rhs_table'=> 'notes', 'rhs_key' => 'parent_id',
                                                              'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
                                                              'relationship_role_column_value'=>'Contratos')
            ),
    Last edited by pesadilla; 2006-12-01 at 07:20 PM. Reason: FIXED

Thread Information

Users Browsing this Thread

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

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
  •