Results 1 to 3 of 3

Thread: Adding The Account Sub Panel Module To Contacts

  1. #1
    SponjWorthy is offline Sugar Community Member
    Join Date
    Mar 2005
    Posts
    74

    Lightbulb Adding The Account Sub Panel Module To Contacts

    I work for an HMO frequently we have agents that have more than one account that they manage. Well Sugar doesn't exactly handle this at the moment. I've found that if you assign multiple accounts sugar is just fine with that until you edit the contact that you assigned all those accounts to. The second you save it it deletes all the other accounts in the accounts_contacts table. However if you remove the field from the /contact/edit view form it doesn't overwrite the data. So my idea was to put the Accounts Sub Form Module in the Contacts form so you could select multiple accounts for the contact and then remove the account field in the contacts header. However I can't get the account sub form module to show up in the contact sub panels. Where is the information kept on what sub panels to dieplay in each module? I figure I can add that module and configure the joins in the sql query and away I go. Anyone know?

  2. #2
    SponjWorthy is offline Sugar Community Member
    Join Date
    Mar 2005
    Posts
    74

    Default Re: Adding The Account Sub Panel Module To Contacts

    Still no word... Anyone know what file tells the module what sub modules to load???

  3. #3
    SponjWorthy is offline Sugar Community Member
    Join Date
    Mar 2005
    Posts
    74

    Exclamation Re: Adding The Account Sub Panel Module To Contacts

    To answer my own question the file is called layout_defs.php. Adding the appropriate sub pannel will allow you to view the sub form anywhere. I added the following code to the /contacts/layout_defs.php

    'accounts' => array(
    'order' => 1,
    'module' => 'Accounts',
    'subpanel_name' => 'default',
    'get_subpanel_data' => 'accounts',
    'add_subpanel_data' => 'contact_id',
    'title_key' => 'LBL_ACCOUNTS_SUBPANEL_TITLE',
    'top_buttons' => array(
    array('widget_class' => 'SubPanelTopSelectButton'),
    ),
    This will put the object first in the sub form list. Now I have one more question. How the h'll do I get the sub formes to show more than a mere 10 records?

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
  •