Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: add subpanels

  1. #1
    sk1983 is offline Sugar Community Member
    Join Date
    Feb 2008
    Posts
    41

    Question add subpanels

    Hi,

    I've littlebit searching here on the forum how to add some subpanels, but I don't understand all of it.
    I want to add some subpanels to the campaign detail field, now I have the subpanels "Targetlist and Tracker URLS" and I want have there also the subpanels "History, Contacts and Accounts".

    Can Anybody tell me how I can do this on a simple way???

    greets,

    Stefan

  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: add subpanels

    Hi, Stefan.

    Which version of SugarCRM you are using?

    Cheers

    --
    André Lopes
    Lâmpada Global Services
    Rua Bela Cintra, 299 conjunto. 51
    São Paulo, SP 01415-000
    tel1. 55 11 3237-3110
    cel. 55 11 7636-5859
    e-mail: info@lampadacrm.com.br

  3. #3
    sk1983 is offline Sugar Community Member
    Join Date
    Feb 2008
    Posts
    41

    Default Re: add subpanels

    Hey Andre,

    I'm Using SugarCRM Version 5.0.0b

    greets,

    Stefan.

  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: add subpanels

    Hi, sk1983.

    You have to create extended vardefs, layoutdefs and relationships for defining the subpanels history under default modules.
    In the sugarwiki there are article explaining it.

    These articles can help you:
    http://www.sugarcrm.com/wiki/index.php?title=Subpanels
    http://www.sugarcrm.com/wiki/index.p...s_in_Sugar_5.0


    Cheers

    --
    André Lopes
    Lâmpada Global Services
    Rua Bela Cintra, 299 conjunto. 51
    São Paulo, SP 01415-000
    tel1. 55 11 3237-3110
    cel. 55 11 7636-5859
    e-mail: info@lampadacrm.com.br

  5. #5
    sk1983 is offline Sugar Community Member
    Join Date
    Feb 2008
    Posts
    41

    Default Re: add subpanels

    Thanks, I'm trying to understand how I must do it, I dont have much experience of PHP.
    but, which one must I have, and what is the differents between:
    one-to-many and many-to-many.

    greetz,

    stefan

  6. #6
    sk1983 is offline Sugar Community Member
    Join Date
    Feb 2008
    Posts
    41

    Default Re: add subpanels

    i'm now trying to add the notes subpanel into the Campaign Module by doing the tutorial of: http://www.sugarcrm.com/wiki/index.p...s_in_Sugar_5.0

    and I add the follewing code in the sugar/modules/campaign/vardefs.php

    $dictionary['Campaign']['relationships']['campaign_notes'] = array(
    'lhs_module' => 'Campaign',
    'lhs_table' => 'Campaign',
    'lhs_key' => 'id',
    'rhs_module' => 'Notes',
    'rhs_table' => 'Notes', // must use custom table as we're using a custom Relate field in step 4
    'rhs_key' => 'Campaign_id', // 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['Campaign']['fields']['LBL_STEFAN'] = array (
    'name' => 'LBL_STEFAN',
    'type' => 'link',
    'relationship' => 'campaign_notes',
    'source'=>'non-db',
    'vname'=>'LBL_STEFAN',
    );

    and this code in /sugar/modules/campaign/metadata/subpaneldefs.php

    $layout_defs['Campaigns']['subpanel_setup']['notes'] = array( //Note: <CHILD> in this line must be lowercase
    'order' => 99,
    'module' => 'notes',
    'subpanel_name' => 'default',
    'refresh_page' => 1,
    'get_subpanel_data' => 'LBL_Stefan', // matches the name of the link field
    'title_key' => 'LBL_NOTES_Test',
    'top_buttons' => array(
    array('widget_class' => 'SubPanelTopCreateButton'),
    array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
    ),
    );

    and the last one sugar/modules/campaign/language/en_us.lang.php

    $mod_strings = array (
    'LBL_NOTES_Test' => 'Child Module',
    ...
    );

    After this, the Capmpaign tab gives an error. Can Anybody please help me with this.

    greets,

    Stefan

  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: add subpanels

    Which error?

    --
    André Lopes
    Lâmpada Global Services
    Rua Bela Cintra, 299 conjunto. 51
    São Paulo, SP 01415-000
    tel1. 55 11 3237-3110
    e-mail: info@lampadaglobal.com

  8. #8
    sk1983 is offline Sugar Community Member
    Join Date
    Feb 2008
    Posts
    41

    Default Re: add subpanels

    Hi,
    The error is:
    The website cannot display the page.

    Most likely causes:
    The website is under maintenance.
    The website has a programming error.

    This error (HTTP 500 Internal Server Error) means that the website you are visiting had a server problem which prevented the webpage from displaying.

    I think just a programming error because if I delete the code in the files, I can acces again.

    greets,

    Stefan.

  9. #9
    DragonflyMaster is offline Sugar Community Member
    Join Date
    Dec 2007
    Location
    Rimini, Italy
    Posts
    1,421

    Default Re: add subpanels

    Quote Originally Posted by sk1983
    Hi,
    The error is:
    The website cannot display the page.

    Most likely causes:
    The website is under maintenance.
    The website has a programming error.

    This error (HTTP 500 Internal Server Error) means that the website you are visiting had a server problem which prevented the webpage from displaying.

    I think just a programming error because if I delete the code in the files, I can acces again.

    greets,

    Stefan.
    Could you attach the files you modified so we can have a look at them?
    Even a simple ";" missing can block the execution of your code.
    What do you think the cookie monster eats ?

  10. #10
    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: add subpanels

    Also you can take a look at the error.log of apache web server.
    Generally it register the errors from php.

    Cheers
    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.

Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 6
    Last Post: 2011-03-29, 10:40 AM
  2. add documents to subpanels
    By kbrill in forum Developer Help
    Replies: 0
    Last Post: 2005-10-29, 06:40 PM
  3. Attempting To Add Fields/Checkboxes
    By nsti in forum Developer Help
    Replies: 3
    Last Post: 2005-10-06, 11:18 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
  •