Adding a Meeting's related Account Name to additionaldetails.php

I’m trying to add the Account name to a Meeting’s additionaldetails.php - it should be obvious that if you’re clicking “i” to see a meeting’s details, you’d want to see who it’s with!!

I was able to add the location (also an obvious one to want to see) by copying additionaldetails.php into a custom Meetings directory, and adding this line:

if(!empty($fields['LOCATION'])) 
   $overlib_string .= '<b>'. $mod_strings['LBL_LOCATION'] . '</b> ' . $fields['LOCATION'] . ' <br>';

However, the “Account Name” which the meeting is related to is not stored in the meeting details, and I can’t get any variation of relate field to work.

So I was thinking, the easiest way might be just to pull in the parent account details in a getBean, in additionaldetails.php itself, and show the “name” field, maybe about here:


function additionalDetailsMeeting($fields) {
        static $mod_strings;

        if(empty($mod_strings)) {
                global $current_language;
                $mod_strings = return_module_language($current_language, 'Meetings');
        }

        $overlib_string = '';

// USE A GETBEAN TO PULL IN THE PARENT ACCOUNT FIELDS HERE as $parentAccountFields

    if(!empty($fields['NAME'])) {
                $overlib_string .= '<b>'. $mod_strings['LBL_SUBJECT'] . '</b> ' . $fields['NAME'];
                $overlib_string .= '<br>';
    }

        if(!empty($parentAccountFields['NAME']))
                $overlib_string .= '<b>Account Name'</b> ' . $parentAccountFields['NAME'] . ' <br>';

…

But I’m even stuck on that. Maybe been looking at it too long. I’m using the forums as a last resort - don’t usually ask people to do my work for me! ;->

This would be a great, useful addition to the base code for looking at calendar entries… could anyone help?

Thanks,
David.

Anyone? Anyone? Bueller?

Will?