Results 1 to 8 of 8

Thread: How to Add Related Table?

  1. #1
    bazianm is offline Sugar Community Member
    Join Date
    Jan 2005
    Posts
    22

    Default How to Add Related Table?

    I need to add a table related to the contacts table. I would like it to be a subpanel of the contacts screen. I can't seem to find a way to add a table in the Studio.

    Any ideas how I can do this?

    I would prefer to do this through the native interface without having to modify the php code...

    Thanks in advance...

  2. #2
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: How to Add Related Table?

    Hi bazianm

    Does this table represent another module or is this a table out of SugarCRM modules?

    Regards
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  3. #3
    bazianm is offline Sugar Community Member
    Join Date
    Jan 2005
    Posts
    22

    Default Re: How to Add Related Table?

    I think the answer to your question is yes. Let me illucidate.

    The table I want to add does not exist in sugar. Basically, I have contacts which represent people invited to a wedding. I want to add a table that will allow us to list the people on a particular invite who accepted the invitation so we can do place cards.

    For example, I could have a contact (invitee).

    Mr. & Mrs. John Smith and Family

    When I get the return it could say that John and Molly are coming along with John Jr., Samantha and little Billy. I will need to create three records in this new table as follows:

    Mr. & Mrs. John and Molly Smith
    John Smith, Jr.
    Samatha Smith
    William Smith

    Each record would be used to determine their seating and to print the place cards.

    Thanks for the response...

  4. #4
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: How to Add Related Table?

    Hi bazianm

    Thank you for the clarification.
    It got pretty clear now!

    I suggest you to create a new module (Relatives or something else) and configure it as a subpanel under Contacts.
    If you let SugarCRM manager this data you will recognize it is simpler.

    Kind regards
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  5. #5
    bazianm is offline Sugar Community Member
    Join Date
    Jan 2005
    Posts
    22

    Default Re: How to Add Related Table?

    Thanks. I had a feeling from your question that this would be the answer. I am trying to figure out the module builder now. I appreciate the push in the right direction.

  6. #6
    bazianm is offline Sugar Community Member
    Join Date
    Jan 2005
    Posts
    22

    Default Re: How to Add Related Table?

    Quote Originally Posted by andopes View Post
    Hi bazianm

    Thank you for the clarification.
    It got pretty clear now!

    I suggest you to create a new module (Relatives or something else) and configure it as a subpanel under Contacts.
    If you let SugarCRM manager this data you will recognize it is simpler.

    Kind regards
    OK, I did that. Parenthetically, I think SugarCRM's mod capabilities are awesome! Really cool what you can do with this. However, I am off topic. I now have one thing left to do. How would I REMOVE the subpanels I don't need. Any way I can hide those subpanels?

    If I cannot, I would at least want my new subpanel to be listed first...

  7. #7
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: How to Add Related Table?

    Hi bazianm

    You can do the following:

    Create the file custom/Extension/modules/<ModuleName>/Ext/Layoutdefs/layoutdefs.ext.php

    And add some code like that:

    PHP Code:
    unset($layout_defs["<Module>"]["subpanel_setup"]["<subpanel_module_field>"]); 
    Obviously replace the <Module> and <subpanel_module_field> by the appropriate values.

    <Module>: module you are accessing through DetailView
    <subpanel_module_field>: is the field into modules/<Module>/metadata/subpanels.php which refers to subpanel.

    Regards
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  8. #8
    bazianm is offline Sugar Community Member
    Join Date
    Jan 2005
    Posts
    22

    Default Re: How to Add Related Table?

    Got it. I think this should be doable in the user interface, though...

    Thanks.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Module Detail View show List of Related->Related
    By theLowlyContractor2 in forum Help
    Replies: 0
    Last Post: 2008-09-11, 03:32 PM
  2. List View Display of related Table
    By amitkb in forum Help
    Replies: 1
    Last Post: 2008-08-04, 10:06 AM
  3. Replies: 3
    Last Post: 2007-08-23, 10:42 AM
  4. Replies: 1
    Last Post: 2005-12-02, 07:56 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
  •