Guru Guru - 1 year ago 124
Javascript Question

How to validation check in Netsuite Suitelet Script

I created form using nlapiCreateForm and add some fields.

Clicking submit button I want to check validation but it entered post mode automatically.

Some fields need to be required field so that null value couldn't be inputed.

Anyone pls help me.

Answer Source

When you create your field, you can call .setMandatory()


var form = nlapiCreateForm('Test Form');
var field = form.addField('custpage_testfield','text','Test Field');
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download