Results 1 to 6 of 6

Thread: module builder and subpanel

  1. #1
    michellombart is offline Sugar Community Member
    Join Date
    Feb 2007
    Location
    Vivegnis - Belgium
    Posts
    22

    Default module builder and subpanel

    Hello,

    I'm using 5.2.0d.

    I've created some modules with relationship in module builder. I would that relationship appears in subpanel but I did not find the solution.

    Here the descritpion :

    I've three modules : School, student, work. Relationshipds are :
    • Many to many School -> Student
    • One to many Student -> Work
    • Many to many School -> Work


    When I view a school, I've the Student and Work supanels. Select and create buttons work fine. I need only that the subpanel Work shows the related Student.

    Thank for your help.

    Michel

    What I need is that
    Michel Lombart
    http://www.srtt.be/
    http://www.clic-and-start.eu/

  2. #2
    vishwasrao's Avatar
    vishwasrao is offline A Prolific Poster
    Join Date
    Sep 2008
    Location
    Pune,Maharashtra,India
    Posts
    385

    Smile Re: module builder and subpanel

    Hi ,
    I am not getting you.
    plz give details so that i can help u.
    Vishwasrao Salunkhe
    vishwasrao.salunkhe@gmail.com
    Fan Of Sachin Tendulkar
    Operating System :- Windows XP
    PHP Version:- 5.3
    Apache :-2.2.11
    MYSQL :-5.1.36

  3. #3
    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: module builder and subpanel

    Hi Michel

    According to your needs you want to:
    1. When accessing a Student the subpanel Work is displayed containing some sort of fields;
    2. When accessing a School the subpanel Work is displayed containing the same sort of fields plus the related Student.

    Is that right?
    If yes so you need two Work subpanel_name, one for School (containing the field Student) and another one for Student (the default sort of fields).

    So you need to:
    1. Copy the file modules/<Work Module>/metadata/subpanels/default.php into modules/<Work Module>/metadata/subpanels/ForSchool.php
    2. Edit the file, by hand, modules/<Work Module>/metadata/subpanels/default.php and add into it the student field;
    3. Edit the file custom/Extension/modules/<School Module>/Ext/Layoutdefs/<file regarding layoutdefs of Work under School> and modify the subpanel_name attribute to the new one;
    4. Go to Admin -> Repair -> Rebuild Extensions

    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.

  4. #4
    michellombart is offline Sugar Community Member
    Join Date
    Feb 2007
    Location
    Vivegnis - Belgium
    Posts
    22

    Default Re: module builder and subpanel

    Thank for your reply André,

    What's the right syntax for the student field ? I should follow the relationship between Student -> Work to retreive the Student for each Work.

    Michel
    Michel Lombart
    http://www.srtt.be/
    http://www.clic-and-start.eu/

  5. #5
    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: module builder and subpanel

    2. Edit the file, by hand, modules/<Work Module>/metadata/subpanels/default.php and add into it the student field;

    You need to create a new field array inside that file and copy from custom/modules/<Work Module>/detailviewdefs.php the student field and paste here.
    Obviously you also need to copy the label for the field.

    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.

  6. #6
    michellombart is offline Sugar Community Member
    Join Date
    Feb 2007
    Location
    Vivegnis - Belgium
    Posts
    22

    Default Re: module builder and subpanel

    André,

    In the subpanel default.php file I've something like :

    'date_modified'=>array(
    'vname' => 'LBL_LIST_DATE_MODIFIED',
    'width' => '10%',
    ),

    While in the detailviewdefs.php I've :

    array (
    'name' => 'scp_students_scp_works_name',
    ),

    A copy / past doesn't work, event if I add a label !

    I used only module builder ...

    Thank for your help
    Michel Lombart
    http://www.srtt.be/
    http://www.clic-and-start.eu/

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 13
    Last Post: 2009-02-21, 01:10 AM
  2. Replies: 0
    Last Post: 2008-05-08, 10:05 AM
  3. Replies: 3
    Last Post: 2007-12-21, 08:59 PM
  4. Replies: 0
    Last Post: 2007-11-21, 12:08 PM
  5. Replies: 4
    Last Post: 2007-09-10, 02:14 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
  •