Contacts & Accounts relationship


I need to have the possibility to link many accounts to a contact, this is possible, but that duplicate the contact so we can see three time the same contact with three different account in the list view. I wish to have a subpanel in the contact detail view with the accounts related. One way to do that is to delete the relationship between contact and account module and build a new custom relationship between them. But because of the relationship is not a custom one, I can’t delete her from the studio. One another way to that was to create my subpanel(with programming) but I create the major part of my contacts with the API so the different accounts will not appear in the subpanel. My contact will juste be duplicate with a different account_name. But i need to precise my contacts are not really duplicate, they are one time in the database, they juste appear duplicated in the list view. If someone ca help me that would be very very nice.

Best reards.

Nobody can help me ?

out of box relationship account - contact is a bad relationship.
you must create a many-to-many relationship account-contact.
But yes, you will see many time on list view… but your contact is unique, and for me is normal… it must so.
Imagine the query is like a “DISTINC” in sql, in the list view, you see a contact with a account but what about other contact ?


Hi item,

Thank’s for your response,

All of my contacts with few accounts are duplicate in my listview but in my database they appear only one time. I want to make a subpanel to my contacts where we can see the other accounts related to the contact but I upload my contacts with the API, so if I manually create a relationship, this is not the relation which will be used by the API to relate my contacts and accounts.


Hi for me you have 2 solution :

Sorry if i dont understand all, i speak french


Ahah D’accord moi aussi je parle français, je réponds donc en français pour plus de simplicité,

Merci pour ta réponse,

J’ai déjà essayé les deux technique le problème de la première c’est que je peux avoir mon subpanel avec ce que je veux dedans mais mes contacts apparaissent toujours en dupliquer dans la vue liste et avec un relation custom le problème c’est que l’API n’utilise pas la relation que j’ai crée pour lier les deux éléments elle utilise celle du système de base qui fait apparaître les contacts en dupliquer. Tu parles de load ma relation custom dans l’API, j’ai jamais vu ou entendu de choses de ce genre, un lien à me recommander ?

Et en résumé, ce que j’essaye de faire est de faire en sorte que les contacts puissent avoir plusieurs comptes sans apparaître en dupliquer dans la vue liste mais avec un subpanel compte ou on voit les différents compte qui lui sont liés. En gros que il ait le même comportements que les autres modules.

Mes plus sincères et respectueuses salutations.

The reason why your contacts are duplicate on the list view is simply because you have the Account column visible on the that layout. The database queries all the Contacts and then grabs all the information it needs to display the listview include the Account’s ID and Name. So if you have a contact with multiple Accounts then each query will return a reference to that Account regardless if it already retrieved that Contact (as there is no DISTINCT set for that query). I believe the simplest way is to remove ‘Account’ from the listview layout and thus you should not see any duplicates.