NetSuite Subscription record type

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 SubscriptionBase

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

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

Properties

_id: number

Netsuite internal id of this record

advancerenewalperiodnumber: number
advancerenewalperiodunit: string | number

NetSuite lists this as a select field, but often the value is a string (e.g. DAYS).

autoname: boolean

Auto

autorenewal: boolean

Automatically Initiate Renewal Process

billingaccount: number

Billing Account

billingaccountstartdate: Date

Billing Account Start Date | As of 1/20/22, NetSuite says this is a required field, which is incorrect. It is most likely being confused with startdate.

billingschedule: number

Billing Schedule

billingsubscriptionstatus: string | number

Status | NetSuite lists this as a select field, but it is a string value (e.g. ACTIVE).

currency: number

Currency

customer: number

Customer

customform: number

Custom Form

defaultValues?: object
defaultrenewalmethod: string | number

Default Renewal Method | NetSuite lists this as a select field, but it is a string value (e.g. CREATE_NEW_SUBSCRIPTION). This is optional when Initial Term is Evergreen.

defaultrenewalplan: number

Default Renewal Plan | This is optional when Initial Term is Evergreen.

defaultrenewalpricebook: number

Default Renewal Price Book

defaultrenewalterm: number

Default Renewal Term | This is optional when Initial Term is Evergreen.

defaultrenewaltrantype: number

Default Renewal Transaction Type

enddate: Date

End Date

estimatedrevrecenddate: Date

Estimated Revenue Recognition End Date

externalid: string

External ID

frequency: string | number

Billing Frequency | NetSuite lists this as a select field, but it is a string value (e.g. MONTHLY).

idnumber: null | string

Subscription ID

initialterm: number

Initial Term

initialtermduration: number

Initial Term Duration

initialtermtype: number

Initial Term Type | NetSuite lists this as a select field, but it is a string value (e.g. EVERGREEN).

initialtermunits: string | number

Initial Term Units | NetSuite lists this as a select field, but it is a string value (e.g. MONTHS).

internalid: number

Internal ID

lastbillcycledate: Date

Last Bill Cycle Date

lastbilldate: Date

Last Bill Date

name: string

Subscription Name

nextbillcycledate: Date

Next Bill Cycle Date

nextrenewalstartdate: Date

Next Renewal Start Date

nsrecord: Record

underlying netsuite record

otherrecordnumber: string

Other Record Number

pricebook: number

Price Book

priceinterval - Price Book Lines (Sublist)

renewalnumber: number

Number of Renewal

salesorder: number

Originating Sales Order

startdate: Date

Start Date | As of 1/20/22, NetSuite says this is not a required field, which is incorrect. It is most likely being confused with billingaccountstartdate.

sublinefromplan - Lines (Sublist)

subscriptionline: Sublist<SubscriptionLineSublist>

subscriptionline - Lines (Sublist)

subscriptionplan: number

Subscription Plan

subscriptionplanname: string

Subscription Plan Name

subscriptionrevision: number

Subscription Revision

subsidiary: number

Subsidiary

templatestored: boolean

Template Stored

Accessors

  • get id(): number
  • Returns number

Methods

  • 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