Is there anyway we can make a field mandatory on a...
# suitescript
m
Is there anyway we can make a field mandatory on a client script inside a pageInit function? I tried using the isMandatory, but I think that is only supported inside a UE script
s
scriptContext.currentRecord.getField('memo').isMandatory = true;
This works, as long as the field can be edited.
m
That's what I have, but doesn't seem to run on my pageInit on a client script
r
It puts the cool looking red asterisk mark next to the field. But you still need to validate whether that field is empty or not on saverecord entry point. If it's an empty return false which will not let the user save the record and maybe provide a small alert on why the record is not saved.
m
I have the alert and the asterisk was for completeness.