Hi everyone. I’ve been trying to hide a field in a...
# general
i
Hi everyone. I’ve been trying to hide a field in a Vendor Bill according to other field. I’ve been using the Field.isDisplay = false, but it’s not working. Any ideas why? Any alternatives? Thanks in advance!
m
Are you using a workflow?
b
share what the code looks like
1
i
I’m using a User Event, and in the function beforeLoad, I get the currentRecord and then do the following:
Copy code
var checkboxField = currentRecord.getValue({ fieldId: 'custbody_show_linked_po' });
if (!Boolean(checkboxField)) {
   var linkedPO = currentRecord.getField({
      fieldId: 'custbody_linked_po'
   });
   linkedPO.isDisplay = false;
}
If I log the isDisplay, it comes empty. I’ve done the above following the documentation, so I do not understand why it’s not working. So, what am I doing wrong? 🤔
b
you want to use Field.updateDisplayType
keep in mind that the Field is the one from a form. not the record
i
Ah! Never thought of that. Thanks!!