Module Title

I have a stupid question. Where can I change the Module Title for detail and edit view in e.g. Contacts. to show a different field value as a title instead of the Contacts Salutation, First Name and Last Name.

I basically want to create a new field called e.g Branch Name. I would then like to have the values that users enter into this field to be displayed as a Title when they Edit or view the Details of the record instead of the Mr Joe Bloggs that the system is currently displaying.

Thanks in advance

Hi there,

This would require development/code changes to use a custom field as the link/title of the record within the module and its views.

Thanks,

Will.

Sorry to drag up an old thread, but I’m in the same situation. I need to change Leads to pull its moduleTitle from another field (name_c instead of last_name). What file is this defined in? I can’t find it in the templates. TIA!

Same issue, I simply wanted to alter the name to be highlighted red if the contact was marked a status. For example if the client is marked as “BEHIND” then highlight the name red with a larger font.

To achieve this I will alter the display.

custom/modules/Contacts/views/view.detail.php

Alter the function getModuleTitle() by adding it in the class extension.


<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

require_once('modules/Contacts/views/view.detail.php');

class CustomContactsViewDetail extends ContactsViewDetail{
/**
    * Return the "breadcrumbs" to display at the top of the page
    *
    * @param  bool $show_help optional, true if we show the help links
    * @return HTML string containing breadcrumb title
    */
    public function getModuleTitle( $show_help = true )
    {
        global $sugar_version, $sugar_flavor, $server_unique_key, $current_language, $action;
        [logic here]ETCETCETC
        $theTitle = "Tittle Hack";
        return $theTitle;
    }

....
1 Like

Hi guys,
i needed to make this change so posting the code for anyone else to reference.
The title of any record is created using the following function
get_summary_text()

so to change title to custom_field_c and Name you would make the following change

in /include/SugarObjects/templates/person/Person.php

public function get_summary_text()
{
$this->_create_proper_name_field();
//Old line was return $this->name;
return $this->custom_field_c." ".$this->name;
}

unfortuantely this is not an upgrade safe change.

I have the same problem, can you explain better this soluttion?