add company name to Contacts results when adding a new relationship o type One to Many.

When adding a relationship between Module X and Contacts we see only Fullname, in several cases multiple contacts share the same name.

I would like to customize these results that it would show also a custom field next to the fullname.

I have modified the file fullname.js for Contacts to include my field company_name also, and it worked as far as the record view of Contacts but in these search results the full name still appears to be only first + last name .

  • Hi

    Take a look at modules/Tasks/vardefs.php and search for field 'contact_name'. You will see that this field has attribute 'db_concat_fields'. It tells Sugar which fields must be concatenated on displaying at quick search dropdown.

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • You could avoid customisations of code and just use the 'search and select' option as that will allow you to see more details about the contact so you can make more accurate choices?

    .

    CRM Business Consultant

  • Hi Simo,

    Without changing the default Full Name field in the Contacts module, you can also filter the Contacts related to only the Account. As you have a relationship with the Accounts module in your custom module ( as visible in the screenshot shared). Why can't you filter only the Contacts related to the Account selected in the custom module? This requires a little bit of coding and you can easily achieve this by applying initial filters on relate fields in SugarCRM. Please go through this link to get an idea of how to do this. If you do this so you can only load the contacts related to the specific account selected on your custom module record.

    Hope this information helps :)

    Thanks and Regards,

    Poojitha K