Subscription Term

Use the subscription term record on the subscription plan and subscription record to define the length of a subscription.

After a subscription term has been created in an account, that term becomes available for use on any future subscription plan or subscription created.

The subscription term record is available only when the SuiteBilling feature is enabled at Setup > Company > Enable Features (Administrator), on the Transactions subtab.

For help working with this record in the UI, see Renewing a Subscription.

The internal ID for this record is subscriptionterm.

See the SuiteScript Records Browser for all internal IDs associated with this record. For information about using the SuiteScript Records Browser, see Working with the SuiteScript Records Browser in the NetSuite Help Center.

Note:

For information about using the SuiteScript Records Browser, see Working with the SuiteScript Records Browser in the NetSuite Help Center.

For information about scripting with this record in SuiteScript, see the following:

Supported Script Types

The subscription term record is scriptable in server and client SuiteScript.

Supported Functions

The subscription term record can only be created, read, updated, deleted, searched, and copied. It cannot be transformed.

Code Sample

The following sample shows how to set a six–month subscription term.

          require(['N/record'], function(record) {
    var subscriptionTerm = record.create({
        type: "subscriptionTerm",
        isDynamic: true
    });
    subscriptionTerm.setValue({
        fieldId: "name",
        value: "TestSubscriptionTerm"
    });
    subscriptionTerm.setValue({
        fieldId: "subscriptiontermduration",
        value: 6
    });
    subscriptionTerm.setValue({
        fieldId: "subscriptiontermunit",
        value: "MONTHS"
    });
    log.debug(subscriptionTerm.save());
    }); 

        

Related Topics

General Notices