Hey, I am using a client script to set a transacti...
# suitescript
j
Hey, I am using a client script to set a transaction field as mandatory. It seemingly works in that it adds the red asterisk, but then doesn't actually enforce that a field value be selected before the record is saved. Is this expected behavior? Strikes me as odd. Hope this isn't a completely dumb question.
Copy code
var field = currentRecord.getField('custbody_mycustomfield');
field.isMandatory = true;
Thx in advance for any help!
m
The documentation doesn't actual specify you can use that property as a setter.
Returns
true
if the standard or custom field is mandatory on the record form, or
false
otherwise.
SuiteAnswer # 85631 is more explicit that it's "read-only" and you need to do your own checking in the saveRecord entry point
j
Thanks, Michael. I wondered if this was the case