Modules
Objects/Functions
SuiteScript 2.0
// Please search https://system.netsuite.com/app/help/helpcenter.nl?search=Field.isMandatory for more information.
N/record Module
Field.isMandatory
Property Description:
Returns true if the standard or custom field is mandatory on the record form, or false otherwise.
Type:
boolean
Supported Script Types:
Client and server-side scripts
For more information, see SuiteScript 2.0 Script Types.
Module:
N/record Module
Sibling Object Members:
Field Object Members
Since:
2015.2
Search NetSuite -
https://system.netsuite.com/app/help/helpcenter.nl?search=Field.isMandatory
Example:
// Code Example 1
// Add additional code.
//...
var objRecord = record.load({
type: record.Type.SALES_ORDER,
id: 275
});
var objSublist = objRecord.getSublist({
sublistId: 'item'
});
var objField = objSublist.getField({
fieldId: 'item'
});
if(objField.isMandatory){
var options = {
title:'Incomplete Field:',
message: 'Please complete this field.'
};
dialog.alert(options);
//...
// Add additional code.
//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4435755588.html