Cannot add related field to listview

Hi
I would like to add a column to Opportunities List View.
The column should show the next Activity (Call, Meeting, etc.) for the opportunity.

If I add a custom text field I have figured how to show the field in list view.
I have added a new 1-many relation between opportunities and activities.
I have tried to set it up like the campaigns is shown in the same listview, but that doesn’t work.

Anyone that can help?

Are you a PHP developer?

you can do this by creating a “non-db field” and adding it to the list view.

Then you use a “process_record” hook to run a bit of PHP to get the value you want to show. This could run a query to calculate the next activity.

Similar example here:

https://stackoverflow.com/questions/15278977/sugarcrm-smarty-code-in-listviewdefs

I cannot get it to work, but a bit of searching also suggests that this is the way to do it in V6.5 but that it wouldn’t work for v7.
Could that be the case?

You might be confusing SugarCRM with SuiteCRM

There is no SuiteCRM 6.x