Setting field mandatory to True/false using Client Script

Using SS2.0 on a client script you can make it mandatory. You can set mandatory using SuiteScript 2.0 though although it does not works in 1.0.

Below, is an example snippet using client script on customer record

var currentRecord;require(['N/currentRecord'], (currentRecord) => {
  var field = currentRecord.get().getField('comments');
  field.isMandatory = true;
})

Leave a comment

Your email address will not be published. Required fields are marked *