Results 1 to 6 of 6

Thread: Link multiple Opportunities to 1 contract

  1. #1
    NetSpot is offline Junior Member
    Join Date
    Feb 2008
    Posts
    8

    Default Link multiple Opportunities to 1 contract

    Hi,

    Our actual contracts cover multiple services, so we would like to reflect this in Sugar as well, by linking more than 1 Opportunity to a Contract.

    In Sugar when I create a new Contract I can only link 1 Opportunity. What is the best way to link multiple Opportunities to 1 Contract?

    We are thinking about simply adding more Opportunity fields via Studio. Is this a recommended solution? Any chance of creating problems with this approach down the line?

    Thanks,
    Thomas

  2. #2
    NetSpot is offline Junior Member
    Join Date
    Feb 2008
    Posts
    8

    Default Re: Link multiple Opportunities to 1 contract

    I experimented a bit and added a custom field to Contracts. The field is called Opportunity 2, Data Type is Relate and I selected the Module Opportunities. Reportable is ticked, Dependent, Required Field and Audit is unticked. Importable is set to Yes and Duplicate Merge is Disabled.

    In Layouts I then moved this new field into Edit View and Detail View.

    This seems to work fine. In Contracts I can now select a second Opportunity and looking at Opportunities I can't see any problems there either.

    But if I run a report that displays Opportunity 2 in a column and then I click on this opportunity I get an error message saying this information can not be displayed. If I click in the report on the other opportunity of the contract (from the original Opportunity field of the contract) the opportunity opens without problems. Also this original opportunity is displayed with a pen icon to the right, Opportunity 2 is missing this icon.

    This in itself would not be a big problem, but I am afraid adding the second opportunity might also create other problems that might be more significant.

    Do you have any thoughts or recommendations on this? Your input would be really appreciated.


    Another question: In Studio > Contracts > Fields I can't see the field Opportunity (the original opportunity field). Why is that?

    Thanks!

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

    Default Re: Link multiple Opportunities to 1 contract

    Yeah, that field is old code from before we had the ability to add custom relationships. Do you just need to add one additional Opportunity? If so then just add a one-to-many relationship to Contracts, you will get the same field but it will work everywhere else properly too.

    If you need more than one additional Opportunity then you will have to either add multiple one-to-many relationships (I dont recommend this tho) or a many-to-many relationship which will add a subpanel instead of a field on the editview.
    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

  4. #4
    NetSpot is offline Junior Member
    Join Date
    Feb 2008
    Posts
    8

    Default Re: Link multiple Opportunities to 1 contract

    Hi Kenneth,

    Thanks for your help.

    In Contracts, if I add a many-to-many repationship, I get a subpanel on the Contracts side, but none in Opportunities.

    If I add a one-to-many relationship in Contracts I get a subpanel in Contracts and a field in Opportunies.

    What I would liketo be able to do is, when I create a new Contract I would like to click on the select arrow icon to chose an opportunity (as it works now for the original opportunity that is available for selection in Contracts), then go to the next opportunity field, click again on the select arrow and add a second opportunity. I also would like to have the option to add a 3rd and 4th opprotunity in that way to a contract.

    Any thoughts on this?

    Thanks,
    Thomas

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

    Default Re: Link multiple Opportunities to 1 contract

    Quote Originally Posted by NetSpot View Post
    Hi Kenneth,

    Thanks for your help.

    In Contracts, if I add a many-to-many repationship, I get a subpanel on the Contracts side, but none in Opportunities.
    Then something is wrong, I would first check to make sure Contracts is NOT on the list in admin->Display Modules tabs and subpanels (it is there by default)

    Quote Originally Posted by NetSpot View Post
    If I add a one-to-many relationship in Contracts I get a subpanel in Contracts and a field in Opportunities.

    What I would like to be able to do is, when I create a new Contract I would like to click on the select arrow icon to chose an opportunity (as it works now for the original opportunity that is available for selection in Contracts), then go to the next opportunity field, click again on the select arrow and add a second opportunity. I also would like to have the option to add a 3rd and 4th opportunity in that way to a contract.

    Any thoughts on this?

    Thanks,
    Thomas
    Just add a one-to-many relationship in the other module (which ever one you added the previous one-to-many to). If you want the field in Contracts (rather than a subpanel) then add the relationship to Contracts as the module you add a one-to-many relationship to gets the fields and the other module gets the subpanel.
    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

  6. #6
    NetSpot is offline Junior Member
    Join Date
    Feb 2008
    Posts
    8

    Default Re: Link multiple Opportunities to 1 contract

    Thanks Kenneth,

    Very helpful, this solved my questions.

    Cheers,
    Thomas

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Link missing in the Dashboard for Opportunities
    By gettingsugared in forum Developer Help
    Replies: 1
    Last Post: 2011-04-26, 05:28 PM
  2. Add Multiple Activities When Opportunities Won - $$$
    By idbpro in forum General Discussion
    Replies: 1
    Last Post: 2010-07-10, 04:06 AM
  3. to link documents and opportunities
    By gstretti in forum Help
    Replies: 0
    Last Post: 2007-02-19, 01:28 PM
  4. Opportunities Link to Contact Instead of Accounts
    By swhitlow in forum General Discussion
    Replies: 6
    Last Post: 2006-03-24, 10:55 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
  •