Results 1 to 3 of 3

Thread: changing standard relationships

  1. #1
    monicaDC is offline Sugar Community Member
    Join Date
    Feb 2009
    Posts
    175

    Default changing standard relationships

    Hi there!
    I need to change the contacts-to-opportunities relationship to one-to-one. How would I go about doing this? Please advise. thank you in advance.

    Cheers!
    Monica

  2. #2
    kinshibuya's Avatar
    kinshibuya is offline A Sugar Hero
    Join Date
    Jul 2008
    Location
    brasil
    Posts
    521

    Default Re: changing standard relationships

    Hi monica you probably would need to change many fields to do this, isn't it easyer just to add the account's name on the detail view and remove the subpanel?
    Priscila Kin Yamamoto Joranhezon
    Phone: +55 61 32010000
    priscila.joranhezon@nct.com.br
    NCT Informática Ltda

  3. #3
    eescribano's Avatar
    eescribano is offline Senior Member
    Join Date
    Mar 2009
    Location
    Netherlands
    Posts
    85

    Default Re: changing standard relationships

    the standard relationship between opportunities and contact I can find is the one in metadata/opportunities_contactsMetaData.php

    I think you can override this in custom changing the relationship_type to "one-to-one"

    Something like this:
    In custom/Extension/modules/Opportunities/Ext/Vardefs/{name_you_want}.php

    $dictionary["Opportunity"]["relationships"]['opportunities_contacts'] = array(
    'lhs_module' => 'Opportunities',
    'lhs_table' => 'opportunities',
    'lhs_key' => 'id',
    'rhs_module' => 'Contacts',
    'rhs_table' => 'contacts',
    'rhs_key' => 'id',
    'relationship_type' =>'one-to-one'
    );

    Perhaps even could work only writing the line of relationship_type like this:
    $dictionary["Opportunity"]["relationships"]['opportunities_contacts']['relationship_type'] = 'one-to-one';
    Elisabeth Escribano
    Webdeveloper

    MADCAP verademing in ict

    e.escribano@madcap.nl

    Schapedrift 89
    3371 JJ Hardinxveld-Giessendam
    Netherlands
    Tel 088 99 088 99
    Fax 088 99 088 98

    www.madcap.nl

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 4
    Last Post: 2010-03-16, 12:46 PM
  2. standard relationships
    By monicaDC in forum Developer Help
    Replies: 6
    Last Post: 2009-05-13, 08:04 PM
  3. Using relationships with standard modules
    By kdiederich in forum General Discussion
    Replies: 2
    Last Post: 2008-10-03, 04:01 AM
  4. Replies: 0
    Last Post: 2007-12-27, 06:55 PM
  5. Replies: 14
    Last Post: 2007-01-19, 09:35 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
  •