Netsuite Inventory Item record type

Hierarchy

  • Item
    • InventoryItemBase

Constructors

  • Loads an existing record with the given internal id

    Example

    // load customer with internal id 123
    const c = new Customer(123)

    Parameters

    • id: NonNullable<string | number>

      record internal id to load

    • Optional isDynamic: boolean

      set true if you want to load the record in dynamic mode

    Returns InventoryItemBase

  • Creates an NSDAL instance for the given existing NetSuite record object. This does NOT reload the record - it just wraps the supplied rec

    Example

    // assume `ctx` is the _context_ object passed to a `beforeSubmit()` entrypoint.
    // results in an NFT representation of the 'new record'
    const customer = new Customer(ctx.newRecord)

    Parameters

    • rec: NonNullable<ClientCurrentRecord | Record>

      an existing netsuite record

    Returns InventoryItemBase

  • creates a new record

    Example

    // start a new customer record
    const c = new Customer()

    // start a new customer record in dynamic mode
    const c = new Customer(null, true)

    Parameters

    • Optional unused: Nullable<string | number>

      either null or leave this parameter out entirely

    • Optional isDynamic: boolean

      true if you want to create the record in dynamic mode, otherwise uses standard mode.

    • Optional defaultvalues: object

      optional defaultvalues object - specific to certain records that allow initializing a new record.

    Returns InventoryItemBase

Properties

_id: number

Netsuite internal id of this record

assetaccount: number
atpmethod: number
autoleadtime: boolean
autopreferredstocklevel: boolean
availabletopartners: boolean
averagecost: number
billingschedule: number
billpricevariantacct: number
class: number
cogsaccount: number
consumptionunit: number
contingentrevenuehandling: boolean
copydescription: boolean
cost: number
costcategory: number
costingmethod: number
countryofmanufacture: string

This is a 'select' field according to records browser but actually requires the two character country code for values.

createddate: Date
customform: number
defaultValues?: object
deferredrevenueaccount: number
deferrevrec: boolean
department: number
description: string
displayname: string
externalid: string
includechildren: boolean
incomeaccount: number
isdonationitem: boolean
isdropshipitem: boolean
isgcocompliant: boolean
isinactive: boolean
isonline: boolean
isspecialorderitem: boolean
isstorepickupallowed: boolean
itemcondition: number
itemid: string
itemoptions: number
itemtype: string
lastmodifieddate: Date
location: number
nsrecord: Record

underlying netsuite record

parent: number
purchasedescription: string
revrecschedule: number
subsidiary: number
taxschedule: number
tracklandedcost: boolean
tranid: string
units: number
unitstype: number
upccode: string
usebins: boolean
vendorname: string
weight: number
weightunit: number

Accessors

  • get id(): number
  • Returns number

Methods

  • Persists this record to the NS database

    Returns

    Parameters

    • Optional enableSourcing: boolean
    • Optional ignoreMandatoryFields: boolean

    Returns number

  • Returns any

  • The netsuite record type (constant string) - this is declared here and overridden in derived classes

    Returns Type

Generated using TypeDoc