display custom account field in contact detail view

Is it possible to display a custom field ( created in the accounts module) in the contacts detail view ?
I read the posts on this and I have seen it can be done with a Calculated field and this feature is not available in the CE edition which i’m using.

I also see that it can be done with logic hooks

I am not a programmer but I can write a few lines of code

What would be the best ? I am willing to pay an add-on…

Thanks !

Your best option will be to create a similar field in contacts which will only be displayed on detail view.
When saving the contact run a before_save logic hook. In the said logic hook, use beans to fetch the account to which the contact belongs to and update the fields accordingly.

I am not sure if you are familiar with beans and logic hooks. I can help you out in case you are unsure of how to code this.

Hi,
Thanks for your answer. I have no idea how to code this -> maybe you could send me a few url’s where I could find the documentation ?
You would be very kind.

Thanks !

For logic hooks
http://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_7.6/Logic_Hooks/Module_Hooks/before_save/

For Beans:
https://developer.sugarcrm.com/2012/03/23/howto-using-the-bean-instead-of-sql-all-the-time/

I’ve posted a sort of sample code over here https://suitecrm.com/forum/suitecrm-7-0-discussion/12823-workflow-action-to-populate-field#43249
Hope it helps you too!

Thank you very much ! I will look at this very soon and give you feedback

:slight_smile:

You have to modify the theme structure. You can start by tracing the called class using the source of the page from your browser.

Check this link for some ideas:

https://suitecrm.com/suitecrm/forum/suite-themes/2720-how-can-i-display-the-user-image-in-header-part

Please ignore my previous post. It was my response to other topic. (IF the moderator can delete it from this topic it will be good to keep it clean)

Thanks,

It’s easier to do that with a workflow. Create the custom field, create a workflow on contacts module, only on save, and create an action to update record, copying the content from the Accounts field.

It’s quick and dirty.

You can check a more classy approach at Opportunities-Contacts relationship (it’s the Contact subpanel under Opportunities). Look at the Contacts vardefs, you can see the contact email (or phone, I don’t remember) in the Tab,

Rgds,

Marcio