I am updating a mandatory field based on when a ch...
# suitescript
s
I am updating a mandatory field based on when a checkbox is selected. The red astrik is on the field, but it lets me save it still? Does anyone have any advice on how I can get netsuite to update it's validation as well? I'm setting it on a client script with the following .
Copy code
const isCardOnFile = dmHelper.parseBool(rec.getValue('custbody_mes_card_on_file'));
const selectCardField = rec.getField('custbody_mes_select_card_on_file');
selectCardField.isMandatory = !!isCardOnFile
s
In my experience setting it to
.isMandatory
only adds that asterisk and you need to add the validation yourself on save.
s
Really!? That's annoying. I know if you set it on a beforeSubmit, it will honor it. That's annoying about a client script