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.

  • frinaldi,

    Cédric Mourizard is perfectly right. (Hi Cedric! I hope you are doing fine!)

    Usually for this scenario I suggest to create a new "Employment" module with start and end dates and status and relationships with Contacts and Accounts.

    Then I would recommend to create some hooks (mostly relationship based hooks) to maintain those records based on if a Contact is related or not to an Account via the standard relationship.

    --

    Enrico Simonetti

    Sugar veteran (from 2007)

    www.naonis.tech


    Feel free to reach out for consulting regarding:

    • API Integration and Automation Services
    • Sugar Architecture
    • Sugar Performance Optimisation
    • Sugar Consulting, Best Practices and Technical Training
    • AWS and Sugar Technical Help
    • CTO-as-a-service
    • Solutions-as-a-service
    • and more!

    All active SugarCRM certifications

    Actively working remotely with customers based in APAC and in the United States

Reply Children
No Data