Namespace: SublistProcessor

NetsuiteToolkit. SublistProcessor

Source:

Members

<static> MalformedData

An exception thrown in the event that the sublist data given is malformed.
Source:

<static> UnableToMatch

An exception thrown in the event that a line item cannot be matched to a given field.
Source:

Methods

<static> SublistProcessor#compareLineItemValue(index, match_field, match_value) → {Boolean}

Compares the value of a given field at a given line item index with the given value
Parameters:
Name Type Description
index Number The Number representing the index position of the line item
match_field String The String representing the internalid of the line item field
match_value String The String representing the value to be compared against
Source:
Returns:
The Boolean representing the successful match
Type
Boolean

<static> SublistProcessor#createLineItem(creation_request)

Creates and alters the fields of a new line item using the given params
Parameters:
Name Type Description
creation_request object The Object that hold a single creation request for a line item
Source:

<static> SublistProcessor#exciseLineItem(excise_request)

Removes a line item using the given params
Parameters:
Name Type Description
excise_request object The Object that hold a single excise request for a line item
Source:

<static> SublistProcessor#execute()

Procedural function to execute all sublist operations on the given record and sublist
Source:

<static> SublistProcessor#matchLineItemByField(match_field, data) → {Number}

Locates the index of a line item matching the given field data, returns the first match encountered. An exception is raised if no match is found
Parameters:
Name Type Description
match_field String The String representing the internalid of a line item field
data object The Object representing the line item field and value data
Source:
Returns:
The Number representing the index of the mateched line item
Type
Number

<static> SublistProcessor#processCreations()

Iterate over list of creation requests and execute them
Source:

<static> SublistProcessor#processExcisions()

Iterate over list of excision requests and execute them
Source:

<static> SublistProcessor#processUpdates()

Iterate over list of update requests and execute them
Source:

<static> SublistProcessor#updateLineItem(update_request)

Alters the fields of a line item using the given params
Parameters:
Name Type Description
update_request object The Object that hold a single update request for a line item
Source:

<static> SublistProcessor#updateLineItemFields(index, line_item_data)

Updates all declared fields of a line item at the given index
Parameters:
Name Type Description
index Number The Number representing the index position of a line item
line_item_data object The Object representing the fields and values for a line item alteration
Source: