Sugar 7 Contact module record view header add middle name

Hello,

I want to add middle name record view header pane in contact module.

Ramana Raju Santhana Francesca Shiekh Alan Apter

Thanks

Dipesh

Offshore Evolution Pvt Ltd

Parents Reply
  • Hi Matt Marum,

    custom/modules/Contacts/clients/base/fields/fullname/fullname.js

    /*
    *  I only wanted to apply this change to the Contacts modules so I put this file in:
    *  custom/modules/Contacts/clients/base/fields/fullname/
    */

    ({
        extendsFrom: 'FullnameField',

        formatMap: {
            'f': 'first_name',
            'l': 'last_name',
            's': 'salutation',
            'm': 'middle_name_c'
        },

        initialize: function(options) {
            // override the name format for this module
            app.user.setPreference('default_locale_name_format', 's f m l');

            this._super('initialize', [options]);
        },

        format: function() {
            var fullname = this.model.attributes.salutation +' '+ this.model.attributes.first_name +' ';
                fullname += this.model.attributes.middle_name_c +' '+ this.model.attributes.last_name;

            return fullname;
        },
    })
Children
No Data