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
  • You add custom/modules/Contacts/clients/base/fields/fullname/fullname.js

    ({
    extendsFrom: 'FullnameField',
    formatMap: {
    'f': 'first_name',
    'l': 'last_name',
    's': 'salutation',
    'p': 'preferred_name_c',
    'm': 'middle_name_c'
    },
    initialize: function(options) {
    // override the name format for this module
    app.user.setPreference('default_locale_name_format', 's f p m l');
    this._super('initialize', [options]);
    },
    format: function() {
    var fullname = this.model.attributes.salutation +' '+ this.model.attributes.first_name +' ';
    fullname += (!_.isEmpty(this.model.attributes.preferred_name_c)) ? '"'+ this.model.attributes.preferred_name_c +'" ': ' ';
    fullname += this.model.attributes.middle_name_c +' '+ this.model.attributes.last_name;
    return fullname;
    },
    })
Children
No Data