To perform operations on Netsuite records and objects, it is crucial to understand search functionality provided by Netsuite. Netsuite offers basic and advanced search objects on various record types, and their operations are practically the same.
The search results are either an array if there are more than 1 record returned, or an object if there is only 1 record in its result set. As a programmer, the result set must be examined whether it's an array or an object before performing an operation on them.