How to access an information hold by a relationship in my view / layout / field ?

Hello,

I want to improved the Contact subpanel for the account's module, by including an additionnal CSS property to highlight contact that do not "work" anymore for the account, ie the contacts marked as not primary in the relationship accounts_contacts table.

But I don't know how to access this property from my model...

In my idea, it should be something similar to the Contacts subpanel for opportunity, where you can see the ROLE, which is also an attribute of the relationship between the contact and the opportunity.

Any help / idea is welcome...maybe from my "bests" helpers :-) Cédric Mourizard Angel Magana Francesca Shiekh André Lopes hats Matt Marum Michael Shaheen ???

Best regards,

Fred

Parents
  • Hello Fred,

    To improve the CX: do not use that  Maybe you can try to duplicate this information in a non-db field set during the relationship retrieving by overriding the linkclass or the api endpoint however both are not very "nice" probably.

    Without joking, may be you can use this as a real one-to-many and a custom module which store the history of the relationship with date to start and end like a qualified relationship. By this way to can do everything on front end and most of all you can report that as you want.

  • Hello and thank you Enrico Simonetti and Cédric Mourizard,

    This is currently the solution we used.

    But, because there is the same kind of behavior in the contact's opportunity subpanel, I want to know it there was an easy way to get this "attribute" of the relationship in my subpanel and then extend it.

    It seems that, according to your answers, it's a no.

    Many thanks one more time, and I hope that all of you and your families and relatives and friends are fine.

    See you soon,

    Fred

  • This is how we did it without logic hook

Reply Children
  • Hello Greg Barrass,

    So the Status is displayed according to the information hold by the link between the account and the contact or is it only an additionnal field on the contact record ?

    Because, if it's the second option, it mean that you need to duplicate contact if he moved from one account to another one, and this is what we want to avoid.

    Fred

  • hi frinaldi
    Forgive me if you have already considered the main flaw with moving Contacts to different Accounts?

    As you move a Contact, all their related info that was only relevant to the previous Account has now moved with them, therefore missing from that Account and it's historical records.
    Or are you planning on covering this issue some other way?