AnsweredAssumed Answered

Add something to Contact -> Autofill Account

Question asked by community-support on Jan 13, 2014
Latest reply on Sep 28, 2016 by Vincent Amari

I basically have 2, related yet independent questions:

I have created a new module. Amongst other things, it has an Accounts and an Contacts field which are related to the according modules as Many-To-One. So on the DetailView of both the Accounts and the Contacts there is a subpanel for my new module. Now: There is no Accounts field in the quick create, since the account will always be determined by the current account or contact I look at. When I am on the detail view of an Account the Account field will be filled automatically, however when I am on the detail view of a contact, the Account will NOT be filled automatically - only the contact is filled. I though of copying the account from the contact to my module in a logic hook, but I am not sure how I can access the account information. So my first question is: How can I access the account information of a contact in a logic hook - or is there a better solution to my problem.

Secondly, when I quick create a new instance of my module in the detail view of an account I want to select a contact. However, the selection should be limited by the account I am in: I only want to be able to select a contact who really is associated with the particular account. I do see a similar behavior in the AOS quotes module: When I select an account there, I can only select relevant contacts.



(from petap)