SuiteScript 1.0 to 2.1 reference

nlapiSubmitField in SuiteScript 2.1

In SuiteScript 2.1, nlapiSubmitField is replaced by record.submitFields from N/record. Updates body fields without loading the whole record. Cheaper in governance than load and save.

Before and after

// SuiteScript 1.0
nlapiSubmitField('customer', 42, ['phone', 'url'], ['555-0100', 'https://acme.example']);
// SuiteScript 2.1
define(['N/record'], (record) => {
  record.submitFields({
    type: record.Type.CUSTOMER,
    id: 42,
    values: { phone: '555-0100', url: 'https://acme.example' },
  });
});

What to watch for

  • Parallel arrays of fields and values become one values object.
  • Only body fields that support inline editing can be set this way, as in 1.0.
  • Checkbox values are booleans in 2.1, not 'T' and 'F'.

Related functions

Find what still needs converting

Find every script that still calls nlapiSubmitField

SuiteMigrate lists the active 1.0 and 2.0 scripts in your NetSuite account, shows which ones you can read and which are locked, and drafts 2.1 conversions you review before deploying. Free for 5 conversions.

Add to Chrome — freeRead the migration guide

Examples are simplified. Test converted code in a NetSuite sandbox before deploying. SuiteMigrate is not affiliated with Oracle or NetSuite.