Results 1 to 4 of 4

Thread: Accounts Subpanel of custom module

  1. #1
    lowJack01 is offline Sugar Community Member
    Join Date
    Sep 2007
    Location
    Albuquerque, NM
    Posts
    86

    Default Accounts Subpanel of custom module

    I am having an awful time getting a subpanel to display. I could really use some guidance. I have followed the Wiki article, Creating 1-to-many relationships in Sugar 5.0.

    1. I have created a custom relate field in the child module: client_name_c
    the relate field acts properly in edit view, but then once saved, it doesn't update - no data in any view, nor in the database table.
    (There is a relate field already which works, but it's in the main table, not the custom table - I built it before I knew there would be a need for a subpanel. Could this be conflicting?)

    2. Added the field to the edit view and detail view

    3. Editted vardefs:
    custom/Extension/modules/Accounts/Ext/Vardefs/vardefs.php

    Code:
    $dictionary['Account']['relationships']['account_YRE08_Year_End_2008'] = array( 
    'lhs_module' => 'Accounts', 
    'lhs_table' => 'accounts', 
    'lhs_key' => 'id', 
    'rhs_module' => 'YRE08_Year_End_2008',
    'rhs_table' => 'yre08_year_end_2008_cstm', // must use custom table as we're using a custom Relate field in step 4
    'rhs_key' => 'client_name_c', // must match the name of the field containing the PARENT id in the CHILD_cstm table
    'relationship_type' => 'one-to-many' // one LHS to many RHS
    );
    
    $dictionary['Account']['fields']['client_name_c'] = array ( 
    'name' => 'client_name_c', 
    'type' => 'link', 
    'relationship' => 'account_YRE08_Year_End_2008', 
    'source'=>'non-db', 
    'vname'=>'LBL_YRE08_Year_End_2008', 
    );
    //<LBL_FIELD_LABEL> can be anything you want, but it must match the key you use in the language file later on
    
    ?>
    4. Ran Quick Repair and Rebuild, and Rebuild Relationships.

    I have iterated through a great deal of different ideas, and have led myself to confusion and doubt. Any assistance from someone who knows how to do this is greatly appreciated.
    Thank you,

    Jackie Trent
    Independent Contractor
    Sugar - 5.0.0d, 5.0.0f
    PHP Version 5.1.6
    MySQL 5.0.58

  2. #2
    lowJack01 is offline Sugar Community Member
    Join Date
    Sep 2007
    Location
    Albuquerque, NM
    Posts
    86

    Default Re: Accounts Subpanel of custom module

    Anyone?

    Please Help!
    Thank you,

    Jackie Trent
    Independent Contractor
    Sugar - 5.0.0d, 5.0.0f
    PHP Version 5.1.6
    MySQL 5.0.58

  3. #3
    danheff is offline Senior Member
    Join Date
    Aug 2008
    Posts
    90

    Default Re: Accounts Subpanel of custom module

    its all a breeze with 5.2...although there are some other unrelated kinks to work out...

    all my difficulties with this same issue (although I created the custom module and relationship in the module builder), then added the relate field once I uploaded) seemed to disappear. As soon as I upgraded, the custom module subpanel was visible AND I could edit the subpanel as well...

  4. #4
    lowJack01 is offline Sugar Community Member
    Join Date
    Sep 2007
    Location
    Albuquerque, NM
    Posts
    86

    Default Re: Accounts Subpanel of custom module

    Hey Dan!

    I upgraded to 5.2a the weekend before last. Everything does seem to be smooth. I just successfully added the custom module subpanel to the accounts module. Things generally look a lot better and studio is a little better, too.

    However, my campaigns module is now broken. Any comments on this are appreciated.

    I hope everything is going well with you!

    - Jackie
    Thank you,

    Jackie Trent
    Independent Contractor
    Sugar - 5.0.0d, 5.0.0f
    PHP Version 5.1.6
    MySQL 5.0.58

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. More than one hop in subpanel under Accounts module
    By jchinnasamy in forum Developer Help
    Replies: 1
    Last Post: 2008-11-19, 09:30 AM
  2. How to add Accounts as subpanel in custom module
    By rraushan2007 in forum Developer Help
    Replies: 6
    Last Post: 2008-09-25, 04:34 AM
  3. Add Accounts Subpanel to the Contacts Module
    By chrislynch8 in forum Developer Help
    Replies: 3
    Last Post: 2008-06-05, 06:19 PM
  4. Custom subpanel in the accounts module
    By jmcalderond in forum General Discussion
    Replies: 0
    Last Post: 2008-05-30, 09:53 PM
  5. Replies: 4
    Last Post: 2007-04-02, 06:19 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
  •