Results 1 to 3 of 3

Thread: Module Builder: Adding a relationship adds a blank field to the edit layout options?

  1. #1
    mtudor is offline Member
    Join Date
    Apr 2009
    Posts
    12

    Default SOLVED: Module Builder Adding relationship adds a blank field to edit layout options?

    Hi guys,

    A weird one this - when adding a relationship between two modules in the module builder, the end of the relationship which has the "one" (of the one-to-one, one-to-many) appears in the "edit layout" sections of the module builder as an empty box (screenshot attached).

    My guess is that this is because you don't set a label on the "one" side of a relationship so Sugar has nothing to display. This is unfortunate, though, because with multiple relationship fields on the same layout it become difficult to distinguish which is which. Also, if you drag the field off the layout it disappears forever!

    Anyone have any ideas why this is, and whether there is a way to fix it?

    Many thanks,

    Mark.
    Attached Images Attached Images  
    Last edited by mtudor; 2009-04-22 at 07:41 AM. Reason: Changing title to "solved"

  2. #2
    gregm is offline Member
    Join Date
    Apr 2009
    Posts
    19

    Default Re: Module Builder: Adding a relationship adds a blank field to the edit layout optio

    I Had this problem

    Found the answer on this blog
    http://www.jejik.com/articles/2008/1..._sugarcrm_5_1/

  3. #3
    mtudor is offline Member
    Join Date
    Apr 2009
    Posts
    12

    Default Re: Module Builder: Adding a relationship adds a blank field to the edit layout optio

    Thanks Greg,

    I've actually been on that blog before, but had missed that article. Thanks for pointing it out for me.

    To summarise for anyone who looks at this post - in case the article disappears:

    The solution is to find the field in question in editviewdefs.php and add a "label" key... e.g.

    custom/modulebuilder/packages/ComputerShop/modules/Applications/languages/en_us.lang.php
    // Beginning of file snipped
    ...
    'LBL_ACTIVITIES_SUBPANEL_TITLE' => 'Activities',
    'LBL_SHOP_APPLICATIONS_SUBPANEL_TITLE' => 'Applications',
    'LBL_NEW_FORM_TITLE' => 'New Applications',
    'LBL_COMPUTER' => 'Computer', // New label
    );

    custom/modulebuilder/packages/ComputerShop/modules/Applications/metadata/editviewdefs.php
    ...
    1 =>
    array (
    'name' => 'shop_computers_shop_applications_name',
    'label' => 'LBL_COMPUTER', // New label
    ),
    ...


    I notice that there are several other useful articles on there for anyone who is interested (i.e. Sugar and SVN).

    Cheers,

    Mark.
    Last edited by mtudor; 2009-04-22 at 07:43 AM. Reason: Adding information on solution.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 2007-08-27, 07:58 AM
  2. Replies: 5
    Last Post: 2007-05-21, 12:59 PM
  3. Replies: 7
    Last Post: 2006-09-25, 08:17 AM
  4. Replies: 17
    Last Post: 2006-04-07, 07:27 PM
  5. Replies: 0
    Last Post: 2006-04-03, 07:34 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
  •