VendorBase

Hierarchy

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 VendorBase

  • 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 VendorBase

  • 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 VendorBase

Properties

_id: number

Netsuite internal id of this record

accountnumber: string
altemail: string
altphone: string
balance: number
bcn: string
billpay: boolean
category: number
comments: string
companyname: string
creditlimit: number
currency: number
customform: number
datecreated: Date
defaultValues?: object
email: string
emailtransactions: boolean
entityid: string
entitystatus: number
expenseaccount: number
externalid: string
fax: string
faxtransactions: boolean
firstname: string
giveaccess: boolean
incoterm: number
is1099eligible: boolean
isinactive: boolean
isjobresourcevend: boolean
isperson: null | "T" | "F"
laborcost: number
language: number
lastmodifieddate: Date
lastname: string
nsrecord: Record

underlying netsuite record

openingbalance: number
openingbalanceaccount: number
openingbalancedate: Date
parent: number
payablesaccount: number
phone: string
purchaseorderamount: number
purchaseorderquantity: number
purchaseorderquantitydiff: number
receiptamount: number
receiptquantity: number
receiptquantitydiff: number
representingsubsidiary: number
sendemail: boolean
subsidiary: number
taxfractionunit: number
taxidnum: string
taxitem: number
terms: number
vatregnumber: string
workcalendar: 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