Relation between accounts and contacts

Hi all,

I am new in SuiteCRM world, I did some tests this week.

I have a very simple structure with Accounts and Contacts. When I create a new Contact, in the Edit form I select the Account to which I want to link it. When I go to the Contact view I see the Account but when I go to the Account view in its subpanel “Contacts” the contact is not here. To add it I have to select it again in the subpanel.

Is it possible to select an account while creating a contact and then to see it in the contacts subpanel of the account ?

Thank you very much.

This should work. Do you see any error in suitecrm.log or apache error log? Or make sure your default subpanel is not collapsed.

1 Like

Thank you for your reply urdhvatech.

I did new tests and you are right, when I add a new contact and when a link it to an account I can see the new contact in the Account’s subpanel.

But this is not working with a custom module created in module builder.

In few words I have a custom module Site with a many-to-many relationship to Account and also an Account field of type Relate. When I create a new Site I select an Account. In the account subpanels I see a Site section but it is empty.

In the database, the table plt_sites_accounts which should have a new entry after the Site creation is empty. Should I do a hook to create a new relation in database ?!

Thank you

I read an interesting reply in this forum : https://community.sugarcrm.com/thread/18219#comment-52981

The author says that a relate field is auto created after a relationship creation but on my case I don’t have any field created. Should I have the same behavior in SuiteCRM ?

How can I do to create a new “link” between Site and Account with my custom relate field ? In my case I have a many-to-many relationship.