How to disable a field using client script.

In the client script we can get the field using field id.

let currentRecord=scriptContext.currentRecord;

 let fieldName = currentRecord.getField({                       

fieldId: ‘fieldid’                   

});                   

fieldName.isDisabled = true;

We can use this method to restrict a field based on the user role.

Leave a comment

Your email address will not be published. Required fields are marked *