Modules

filter

 

Objects/Functions

module (N/record)

SuiteScript 2.0

record.submitFields(options)

{record}.submitFields({type: {string*},id: {number | string*},values: {Object*},options: {enablesourcing: {boolean},})

N/record Module
record.submitFields()
Method Description: Updates and submits one or more body fields on an existing record in NetSuite, and returns the internal ID of the parent record. When you use this method, you do not need to load or submit the parent record. You can use this method to edit and submit the following: Standard body fields that support inline editing (direct list editing). For more information, see Using Inline Editing. Custom body fields that support inline editing. You cannot use this method to edit and submit the following: Select fields Sublist line item fields Subrecord fields (for example, address fields) For the promise version of this method, see record.submitFields.promise(options). Note that promises are only supported in client scripts.
Returns: The internal ID of the parent record.
Supported Script Types: Client and server-side scripts For more information, see SuiteScript 2.0 Script Types.
Governance: Transaction records: 10 units Custom records: 2 units All other records: 5 units
Module: N/record Module
Since: 2015.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=record.submitFields(options)

Example:

// Code Example 1
// Add additional code.
//...

// Submit a new value for a sales order's memo field.

var id = record.submitFields({
type: record.Type.SALES_ORDER,
id: 1,
values: {
memo: 'ABC'
},
options: {
enableSourcing: false,
ignoreMandatoryFields : true
}
});


// Submit a new value for a field on an instance of the 'customrecord_book' custom record type.

var otherId = record.submitFields({
type: 'customrecord_book',
id: '4',
values: {
'custrecord_rating': '2'
}
});

//...
// Add additional code.

//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4267283788.html