Announcement

Collapse
No announcement yet.

Problem linking multiple contacts to an opportunity (and back)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Dmitry
    replied
    No, we just gave up :-(

    Leave a comment:


  • tothewine
    replied
    Any update on this Dmitry ? I am facing a very similar problem where a many-many relation with a base entity is not showing in the Opportunity 's linked field (it shows "..." instead of the list).

    Leave a comment:


  • Dmitry
    replied
    Thank you for your response. Unfortunately, the problem we're facing is more complicated than just that.

    Please let me explain it again.

    1) We have a "contactDeal" many-to-one relationship (many opportunities to the same contact). It works fine and we don't want to do anything with it.

    2) We need to add more links between Opportunity (Deal) and other Contacts, not touching contactDeal!

    3) When we add a new Contact to the "contacts" array, the link is created one-way only (i.e. the added Contact is in the list of contacts on the Opportunity (Deal) page, but the Deal is not on the list of deals at the Contact page). We need this to be working both ways.

    4) If we try to work the other way around and add the link to the Contact entity, then it appears on the Deal page as "contactDeal" (overwriting the contact that was there before). We don't want that, we just want the added Contact to show in the "Contacts" list.

    This is what we do:

    We assume, according to the API documentation, that there there should be two requests to link a deal to a contact and vice versa:

    POST Opportunity/{dealID}/contacts

    {
    "id": "{contactId}"
    }


    and

    POST Contact/contactId/opportunities

    {
    "id": "{dealId}"
    }


    We thought that the first one links Contact to Deal (so the Contact appears in "Contacts" list in the Deal), while the second links the Deal to the Contact, so that the deal appears in "Deals" list ib the Contact.

    In reality, both requests do the same - they link the contact to the deal, thus adding the contact to the "contacts" field of the deal, but not vice versa.

    So please help us create a link from Contact to Deal (without changing the existing contactDeal relationship).

    Leave a comment:


  • tanya
    replied
    Formula - https://www.espocrm.com/documentatio...ation/formula/
    It will work via API and via UI record update

    Leave a comment:


  • Dmitry
    replied
    Any update on that, please?

    Leave a comment:


  • Dmitry
    replied
    Hello,

    Thank you for the response. Unfortunately, I don't seem to understand, how to use it. We need to be able to add an Opportunity (Deal) link to a certain Contact via API, without overwriting links to other Contacts in the Opportunity (Deal).

    Leave a comment:


  • tanya
    replied
    Hello,
    for this you can use formula

    ifThen(entity\isAttributeChanged('contactDealId'), entity\addLinkMultipleId('contacts', contactDealId));

    Leave a comment:


  • Problem linking multiple contacts to an opportunity (and back)

    We have some trouble with "link multiple" for opportunities and contacts.

    This is what we have:
    - two custom relationships "opportunities2contacts" (Many-to-One) called "contactDeal" and "contactBill" (main contact and billing contact)
    - a default "contacts" relationship field.

    This is what we do:
    1) When creating an opportunity (called "Deal" for us) we fill in "contactDeal" (always) and "contactBill" (sometimes). This works well, and the links also appear in the "Deals" relationship panels of the corresponding contacts.

    2) If we get more related contacts (e.g. we get feedback from a person, who is neither contactDeal nor contactBill), we add them to the "contacts" relationship. I this case the backlinks to corresponding Deals do not appear in the relationship panels of such contacts.

    3) If we try to manually add links to Deals for such additional contacts, then for some reason such contact replaces the original contactDeal in the Deal page. This is not what we want, of course.

    We need to be able to add additional contacts to opportunities, that will be linked both ways (so that all related opportunities are seen on the Contact's page).

    We mostly work via API, but creating the links manually via GUI has the same effect.

    Thank you for your help in advance.
Working...
X