Select New Sublist Line

We can use record.selectNewLine(options) to select a new sublist line.

Method DescriptionSelects a new line at the end of a sublist. (dynamic mode only)
Returnsrecord.Record
Supported Script TypesClient and server scripts
GovernanceNone
ModuleN/record Module
Sibling Object MembersRecord Object Members
Parameters
ParameterTypeRequired / OptionalDescription
options.sublistIdstringrequiredThe internal ID of the sublist.This value is displayed in the Records Browser.
Errors
Error CodeThrown If
SSS_INVALID_SUBLIST_OPERATIONA required argument is invalid or the sublist is not editable.
SSS_MISSING_REQD_ARGUMENTA required argument is missing or undefined.
Syntax
// Add additional code.
...
objRecord.selectNewLine({
    sublistId: 'item'
});
...
// Add additional code. 

Example

// Load the Sales Order record           

let salesOrderRecord = record.load({

                type: record.Type.SALES_ORDER,

                id: salesOrderId,

                isDynamic: true           

});

// Select a new line at the end of the ‘item’ sublist               

salesOrderRecord.selectNewLine({

                    sublistId: ‘item’               

});

Leave a comment

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