Display customfield next to the title ($ the Title)


I would like to
Display field next to the title ($ the Title)

I was working on the include \ MVC \ View \ SugarView file

 if ($ module == 'bonus_bonus' && $ action == "DetailView") {
$ theTitle. = "<h2 class = 'module-title-text'> $ paramString  ***my_field_module*** </h2>";

However I do not know how to bring this field my_field_module


I don’t recommend to break system file. You can do it in custom directory of specific module. Example for you. Make the file

class bonus_bonusViewDetail extends ViewDetail
    public function display(){
        $this->errors[]='<span style="font-size: large;letter-spacing: 2px;">'.$my_field_module.'</span>';

Thanks for the reply friend.

I made the changes, but it is not bringing any field, I checked in the code this is bringing the <span> but without the field

All field present in object $this->bean and the name of the filed will be