Results 1 to 6 of 6

Thread: creating relate fields/relationship in 5.1

  1. #1
    mikesolomon is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    UK
    Posts
    1,467

    Default creating relate fields/relationship in 5.1

    I created a new module in 5.1 using the module builder

    One field was a relate field to accounts name

    I then created a one to many relationship from accounts to my new module in studio

    on my first test I called the field account & when I tested it the records did not show in the accounts subpanel

    I then tried again calling the relate field account_name

    This time the subpanel worked

    The way the relationship is working is via a new table account_aa_atest_c

    Under 5.0 I created one-many relationships manually and there is no link table

    Should I now change the relationships on my existing tables to the new format with a link table?
    Mike Solomon
    Development Manager
    Ivy Ltd
    www.ivy.ltd.uk]www.ivy.ltd.uk

    php version 5.2.6
    MySql 5.1.59

  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: creating relate fields/relationship in 5.1

    Hi Mike

    In the Sugar 5.1 when you create a relationship 1:M between two modules you don't need to create a relate field.
    Sugar automatically add a relate field into layout, just based on relationship rules.

    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.

  3. #3
    mikesolomon is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    UK
    Posts
    1,467

    Default Re: creating relate fields/relationship in 5.1

    Quote Originally Posted by andopes
    Hi Mike

    In the Sugar 5.1 when you create a relationship 1:M between two modules you don't need to create a relate field.
    Sugar automatically add a relate field into layout, just based on relationship rules.

    Cheers
    Thanks that helps

    Same question applies tho - should I go back through my custom modules and amend them?
    Last edited by mikesolomon; 2008-10-06 at 08:07 AM.
    Mike Solomon
    Development Manager
    Ivy Ltd
    www.ivy.ltd.uk]www.ivy.ltd.uk

    php version 5.2.6
    MySql 5.1.59

  4. #4
    agcopley is offline Sugar Community Member
    Join Date
    Nov 2007
    Location
    Santiago, Chile
    Posts
    204

    Default Re: creating relate fields/relationship in 5.1

    Quote Originally Posted by andopes
    Hi Mike

    In the Sugar 5.1 when you create a relationship 1:M between two modules you don't need to create a relate field.
    Sugar automatically add a relate field into layout, just based on relationship rules.

    Cheers
    But then this begs the question, why have a field of type relate in Studio??

    Any ideas to how one should differentiate between using a relate field and creating a relationship?

    Thanks
    Andrew

  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: creating relate fields/relationship in 5.1

    Hi Andrew

    I suggest you to always create a new relationship, because this automatically create all necessary features to get it working.
    Creating a Relate Field through Studio require to create the relationship and subpanel by hand.
    I believe SugarCRM will improve the Relate Field in the further releases.

    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.

  6. #6
    agcopley is offline Sugar Community Member
    Join Date
    Nov 2007
    Location
    Santiago, Chile
    Posts
    204

    Default Re: creating relate fields/relationship in 5.1

    Quote Originally Posted by andopes
    Hi Andrew

    I suggest you to always create a new relationship, because this automatically create all necessary features to get it working.
    Creating a Relate Field through Studio require to create the relationship and subpanel by hand.
    I believe SugarCRM will improve the Relate Field in the further releases.

    Kind Regards
    Andopes,
    Thanks for that! I thought I'd mastered 5.0, and now they have changed a whole bunch of stuff...would be worthwhile adding this kind of stuff to the wiki.

    KR
    Andrew

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Problem on Step 7 of Install
    By ChrisA2107 in forum Installation and Upgrade Help
    Replies: 2
    Last Post: 2007-08-20, 08:31 AM
  2. problemi step 6 di SugarSuite-Full-4.0.1h
    By lucia in forum Italiano
    Replies: 0
    Last Post: 2006-12-27, 08:50 AM
  3. Replies: 1
    Last Post: 2006-10-12, 12:07 AM
  4. 4.0.1 Installation Problem
    By clawton in forum Help
    Replies: 14
    Last Post: 2006-02-13, 04:17 PM
  5. Fatal error: Max
    By spokes2k4 in forum Help
    Replies: 3
    Last Post: 2006-01-15, 03:50 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
  •