[Vtigercrm-developers] field view

Preexo preexo at googlemail.com
Fri Feb 12 07:27:37 GMT 2016


my office wanted to hide a couple of fields for a certain role, I added it to
our customization extension in the javascript file. Could be hacked, but
works and it's only about convenience here not about actually hiding the
fields... Let me know if it helps you... 

(function($) {    
    $(document).ready(function() {	
    	var url = 'index.php?module=MSProbes&action=MSProbesAjax&mode=getRole';
    	AppConnector.request(url).then(function(data) {
    		if(data.result != null && data.result != '') {
    			if(data.result.content.role == "H9"){
    				$("#Products_editView_fieldName_productname").prop( "disabled", true
);
                    $("#Products_editView_fieldName_cf_751").prop(
"disabled", true );
                    $("#Products_editView_fieldName_description").prop(
"disabled", true );
                }
            } else {
            	alert("error during getRole");
            }
    	});
    });
})(jQuery);



--
View this message in context: http://vtiger-crm.2324883.n4.nabble.com/Vtigercrm-developers-field-view-tp18350p18400.html
Sent from the vtigercrm-developers mailing list archive at Nabble.com.


More information about the vtigercrm-developers mailing list