Results 1 to 3 of 3

Thread: Opportunity relation to multiple accounts

  1. #1
    laurentzed is offline Member
    Join Date
    Jan 2010
    Posts
    6

    Default Opportunity relation to multiple accounts

    I experienced when using SugarCRM 5.5.0 Community edition an opportunity pointing to multiple accounts.
    When changing in the opportunity edit view the account it points to from the existing one to another one, the accounts_opportunities table keeps the old relationship and tyhe new one.
    Therefore you have this opportunity showing as linked to the 2 accounts when listing existing in the Opportunities list view. When opening the here opportunity, you can see it pointing to the right and last account in mline with the performed opportunity update.

    How to guarantee an opportunity points to only one account? When changing the account an opportunity points to how to make sure only the last updated relationship to the last set account remains in the accounts_opportunities table.

    Studio shows a many-to-many relationship whereas SugarCRM documentation states that an opportunity is only allowed to point to a unique account.
    Please let me know how these can be compatible and used while wiorking with managing opportunities with accounts relationship.

    Thanks

  2. #2
    kbrill's Avatar
    kbrill is offline SugarCRM PS Engineer
    Join Date
    Jul 2004
    Location
    St Louis, MO
    Posts
    3,183

    Default Re: Opportunity relation to multiple accounts

    In my tests so far I have found that while the accounts_opportunities does contain both records after the account is changed, the original relationship is marked as deleted as below

    Code:
    "id";"opportunity_id";"account_id";"date_modified";"deleted"
    "162000c2-73c4-e7ff-3e24-4b44c679e421";"d2900693-b984-956d-b32d-4b44c6c6e85a";"ef5e4c2c-fefc-1f4e-8b3c-4b44c6a3b361";"2010-01-30 19:18:30";"1"
    "1b0de05a-4a88-5765-0b5b-4b6486b92564";"d2900693-b984-956d-b32d-4b44c6c6e85a";"c838a720-fb2f-2972-48f8-4b44c6ecf4c5";"2010-01-30 19:18:30";"0"
    See the "1" at the end of the first record? Are you seeing this in your data as well?

    I also only see it listed in my ListView once.

    Can you give us step-by-step detailed instructions as to exactly how you are changing the account, maybe there is a bug that is specific to your procedure.

    I am not sure why the relationship is many-to-many as I can't see in the interface how that is exposed. It should be a one-to-many. I will enter a bug report for that part of this.
    Kenneth Brill - Help Forum Moderator

    I do not respond to 'Private Messages'. Please email me directly instead

    When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
    Help us Help You

  3. #3
    laurentzed is offline Member
    Join Date
    Jan 2010
    Posts
    6

    Smile Re: Opportunity relation to multiple accounts

    Following your comment I tried to reproduce what I reported.
    1. From Opprtunity edi view change linked account from current account to another one.
    2. List opportunities andcheck the modified one shows up as linked to only the new account.

    I do not see this opportunity listed twice: once with the previous account and a second times with the new one. I lookd at the accounts_opportunities table and did see the deleted mark in line with your indications.

    May be I had troubles with this table. Anyway it is gone and therefore this case is closed besides the "many-to-many" to be changed to "one-to-many".
    Thanks for your help.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Can you link multiple accounts to a single opportunity?
    By JAdams1983 in forum General Discussion
    Replies: 5
    Last Post: 2009-10-22, 04:35 PM
  2. Show only Accounts with a custom relation.
    By hensor in forum Developer Help
    Replies: 0
    Last Post: 2009-06-11, 10:10 AM
  3. Replies: 1
    Last Post: 2009-06-08, 04:51 PM
  4. Replies: 0
    Last Post: 2007-11-26, 08:34 AM
  5. Linking an Opportunity with multiple Accounts
    By Sugarfreak in forum Feature Requests
    Replies: 2
    Last Post: 2007-10-17, 04: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
  •