Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: adding many-to-many relationships between accounts

  1. #1
    ekatsiri is offline Member
    Join Date
    Jan 2008
    Posts
    9

    Default adding many-to-many relationships between accounts

    Dear all,

    please could you help me out with the following request?
    I would like to add a couple of one-to-many and many-to-many relationships between accounts.These relationships denote for example, "has children" that are children of an account holder, and "recommeded by", other accounts that recommended this account. I also need a "reports to" relationship (account reports to account).

    How should I create these relationships? Is it suficient to create them between two instances of the Account module, or do I need to add modules for "recommending acount" and "boss of" and then create realtionships account->recommending account and account -> boss of?

    What I did so far was to rename an existing relationship that links accounts to member organisations to "children of account" and that seems to work well. I would like to do the same using the link account -> account list but I am not sure how to do this. I followed a tutorial http://www.sugarcrm.com/forums/attac...tachmentid=873 which I found very useful, but it does nt seem to work straight away.

    Any help would be greadly appreciated.
    Many thanks,
    Eli

  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: adding many-to-many relationships between accounts

    Hi, Eli.

    You can define how many relationship you want.
    You can create the relationships many-to-many using the Studio and for the relationships one-to-many you can create the fields relate using Studio and configure the relationships theirselve and subpanels directly by coding a bit.

    There are tutorials for this purpose.

    Good look.

    Cheers

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

  3. #3
    ekatsiri is offline Member
    Join Date
    Jan 2008
    Posts
    9

    Default Re: adding many-to-many relationships between accounts

    Dear Andre,

    Please could you give me the pointers to the tutorials you mentioned if you have them handy somewhere? I think I may have found one, but the example is creating a relationship that is linking two existing modules, i.e. Projects to Users. If they had to add this relationship 3 times, say, would they repeat the steps 3 times, once for every relationship? Or would they add new modules? I think they would need to create a new module for Users (rhs) each time.

    I am sorry if this is confusing. I am still trying to understand the data model that is supported by SugarCRM.

    I tried the moduleLoader from Studio but it did not work at the first instance. It asks me to download extensions from sourseforge. I will try to see if I can do that.
    Many thanks,

    Eli

  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: adding many-to-many relationships between accounts

    Hi, Eli.

    The module Accounts has relationship it itself.
    Take a look at its vardefs.

    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.

  5. #5
    clint's Avatar
    clint is offline Sugar Team Member | Forums Lead Moderator
    Join Date
    Aug 2004
    Location
    Silicon Valley
    Posts
    2,120

    Default Re: adding many-to-many relationships between accounts

    I suggest reading this Developer Wiki article on creating relationships. While it describes 1-to-many, the basic logic holds true for many-to-many relationships.

    Also, all of the default relationships are defined in the metadata directory in your Sugar installation. Take a look at those for examples.
    Sugar Developer Zone - developer resources | Sugar University - user and admin training
    Sugar Docs - user and admin documentation |
    Sugar Bug Tracker - Enter or view bugs
    SugarForge- open source modules, themes, lang packs | SugarExchange - commercial extensions

    Clint Oram
    Chief Technology Officer and Co-founder
    SugarCRM

  6. #6
    ekatsiri is offline Member
    Join Date
    Jan 2008
    Posts
    9

    Default Re: adding many-to-many relationships between accounts

    Α quick additional question:

    Do I need to install version 5 to be able to use the module loader?

    Many thanks,

    Eli

  7. #7
    ekatsiri is offline Member
    Join Date
    Jan 2008
    Posts
    9

    Default Re: adding many-to-many relationships between accounts

    ok, I iwll read the article you suggested. Many thanks,

    Eli

  8. #8
    clint's Avatar
    clint is offline Sugar Team Member | Forums Lead Moderator
    Join Date
    Aug 2004
    Location
    Silicon Valley
    Posts
    2,120

    Default Re: adding many-to-many relationships between accounts

    Quote Originally Posted by ekatsiri
    Do I need to install version 5 to be able to use the module loader?
    Module Loader is available in Sugar 4.5. Module Builder is new to Sugar 5.0.
    Sugar Developer Zone - developer resources | Sugar University - user and admin training
    Sugar Docs - user and admin documentation |
    Sugar Bug Tracker - Enter or view bugs
    SugarForge- open source modules, themes, lang packs | SugarExchange - commercial extensions

    Clint Oram
    Chief Technology Officer and Co-founder
    SugarCRM

  9. #9
    ekatsiri is offline Member
    Join Date
    Jan 2008
    Posts
    9

    Default Re: adding many-to-many relationships between accounts

    Quote Originally Posted by andopes
    Hi, Eli.

    The module Accounts has relationship it itself.
    Take a look at its vardefs.

    Cheers.
    Hi Andre,

    Yes, I found that relationship and used it already. I renamed it to look like what I needed. The problem is I need more account-to-account relationships. Many thanks for that.

    Kind Regards,
    Eli

  10. #10
    ekatsiri is offline Member
    Join Date
    Jan 2008
    Posts
    9

    Default Re: adding many-to-many relationships between accounts

    Quote Originally Posted by clint
    Module Loader is available in Sugar 4.5. Module Builder is new to Sugar 5.0.
    Ok, got it now. I also installed version 5 in order to be able to use the moduleBuilder functionality. Many thanks for the clarification.

    Kind Regards,
    ELi

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Sub-panel Relationships - Custom => Accounts
    By rustinp77 in forum Developer Help
    Replies: 2
    Last Post: 2007-08-17, 02:45 AM
  2. Sugar V4.5 Forums Module download?
    By kickedmydog in forum Installation and Upgrade Help
    Replies: 6
    Last Post: 2006-11-12, 12:57 AM
  3. Replies: 1
    Last Post: 2006-09-11, 03:38 PM
  4. Replies: 0
    Last Post: 2005-10-19, 02:49 AM
  5. Replies: 5
    Last Post: 2005-09-01, 10:46 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
  •