Contacts & Accounts relationship

Hi,

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 ?

Hi,
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 ?

Regards

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.

Regards.

Hi for me you have 2 solution :

Sorry if i dont understand all, i speak french

Regards

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.