How to make "Team" field as readOnly on "record view" for all modules ?

Hello Team,

I want to make "Team" field as a readOnly on record view for all modules, so please suggest how I can make it.

Sugar version : 7.7 Ent

Thanks,

Shyam

Parents Reply Children
  • Hi Shyam Gaikwad,

    Try to create record.js in folder <sugar>/custom/clients/base/views/record then put code:

    ({
    extendsFrom:'RecordView',
        initialize:function(options){
           this._super('initialize',[options]);
        },
        _buildGridsFromPanelsMetadata:function(panels){
            var noEditFields = new Array(); // or var noEditFields =[];

            this._super('_buildGridsFromPanelsMetadata',[panels]);
            noEditFields.push('team_name');
            this.noEditFields=noEditFields;
        },
    })

    Do Quick Repair & Rebuild then check once. If unsuccessful, try to duplicate the record.js from <sugar>/jssource/src_files/clients/base/views/record

    then insert the _buildGridsFromPanelsMetadata function then do QRR. Dont forget to tag as Correct Answer if this solves the problem, thanks

    Hope This Helps,

    Roland