function(record, runtime) { function beforeLoad(context) { var currentRecord = context.newRecord; var runtime = context.newRecord; var userObj = runtime.getCurrentUser(); var total = currentRecord.getValue({ fieldId : 'total' }); if(total < 1500){ var button = context.form.getButton({ id : 'receive' }); button.isHidden = true; } }