The Customer Refund (customerrefund) transaction in NetSuite

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 CustomerRefundBase

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

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

Properties

_id: number

Netsuite internal id of this record

account: number

use this in static mode only (e.g. not record mode 'dynamic'

aracct: number
ccname: string
ccnumber: string
chargeit: boolean
createddate: Date
creditcard: number
customer: number
customform: number
defaultValues?: object
deletionreason: number

This field exists only if 'Use Deletion Reason' feature is enabled on the account

deletionreasonmemo: string

This field exists only if 'Use Deletion Reason' feature is enabled on the account

department: number
email: string
entity: number
externalid: string
istaxable: boolean
lastmodifieddate: Date
location: number
memo: string
nsrecord: Record

underlying netsuite record

orderstatus: number
otherrefnum: string
paymentmethod: number
postingperiod: number
salesrep: number
status: string

Note unlike other identifiers in NetSuite, this one is a string (e.g. 'Partially Fulfilled')

statusRef: string

Note unlike other references in NetSuite, this one is a set of undocumented string keys (e.g. 'partiallyFulfilled') The possible statusref values differ for each transaction type

subsidiary: number
trandate: Date
tranid: string

Accessors

  • get id(): number
  • Returns number

Methods

  • Locates first matching line on the 'apply' sublist that corresponds to the passed related recordid. Returns an object that can be used to manipulate the found line in 'current' (dynamic) mode. The returned value is a subset of the full apply sublist for brevity (exposing the most commonly used properties) Note the customer refund instance must be constructed in dynamic mode and include the { entity: <customer>} default values initializer at construction.

    Parameters

    • docId: number

      the internal id of the related document that makes a line appear on the apply sublist e.g. a credit memo on the customer refund calls to nsrecord.setCurrentSublistValue()

    Returns null | {
        amount: number;
        apply: boolean;
        line: number;
    }

  • Persists this record to the NS database

    Returns

    Parameters

    • Optional enableSourcing: boolean
    • Optional ignoreMandatoryFields: boolean

    Returns number

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

    Returns Type

Generated using TypeDoc