Results 1 to 3 of 3

Thread: just need to relate note,but activities

  1. #1
    thinktodo's Avatar
    thinktodo is offline Sugar Community Member
    Join Date
    Aug 2008
    Posts
    296

    Default just need to relate note,but activities

    I want to achieve such a function,for customize module,It just need to relate note,but activities

    how should I do?
    thanks
    I love sugar

  2. #2
    thinktodo's Avatar
    thinktodo is offline Sugar Community Member
    Join Date
    Aug 2008
    Posts
    296

    Default Re: just need to relate note,but activities

    I have done this:
    vardefs.php,add
    $dictionary['pack_module1'] = array(
    'table'=>'pack_module1',
    'audited'=>true,
    'fields'=>array (
    'notes' =>
    array (
    'name' => 'notes',
    'type' => 'link',
    'relationship' => 'pack_module1_notes',
    'source' => 'non-db',
    'vname' => 'LBL_NOTES',
    ),
    ),
    'relationships'=>array (
    'pack_module1_notes' =>
    array (
    'lhs_module' => 'pack_module1',
    'lhs_table' => 'pack_module1',
    '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' => 'pack_module1',
    ),
    ),

    'optimistic_lock'=>true,
    );
    require_once('include/SugarObjects/VardefManager.php');
    VardefManager::createVardef('pack_module1','pack_m odule1', array('basic','assignable'));

    add subpaneldefs.php and add follows content

    $layout_defs['pack_module1'] = array(
    // list of what Subpanels to show in the DetailView
    'subpanel_setup' => array(
    'notes' => array(
    'order' => 40,
    'module' => 'Notes',
    'subpanel_name' => 'Note',
    'get_subpanel_data' => 'notes',
    //'add_subpanel_data' => 'bug_id',
    'title_key' => 'LBL_BUGS_SUBPANEL_TITLE',
    'top_buttons' => array(
    array('widget_class' => 'SubPanelTopButtonQuickCreate'),
    array('widget_class' => 'SubPanelTopSelectButton'),
    ),
    ),
    ),
    );


    but,it does not show subpanel,such as attachment
    Attached Images Attached Images  
    I love sugar

  3. #3
    thinktodo's Avatar
    thinktodo is offline Sugar Community Member
    Join Date
    Aug 2008
    Posts
    296

    Default Re: just need to relate note,but activities

    now,subpanel has show,when I click create button,jumping to note editview.when click save button,there is a error,but,content has been saved actually
    Attached Images Attached Images  
    I love sugar

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Show Contacts Activities in Accounts Activities
    By EDUCASTREAM in forum Developer Help
    Replies: 5
    Last Post: 2010-01-28, 10:41 PM
  2. Replies: 1
    Last Post: 2009-01-21, 12:06 PM
  3. Relate Activities to Custom Module
    By davidhill in forum Help
    Replies: 1
    Last Post: 2008-08-19, 02:57 PM
  4. custom activities in the activities module
    By danikun in forum Developer Help
    Replies: 1
    Last Post: 2008-07-11, 10:42 AM
  5. module builder relate flex relate
    By Meyer in forum Help
    Replies: 0
    Last Post: 2007-12-20, 06:16 AM

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
  •