Merchandise Hierarchy Version

You can use the Merchandise Hierarchy feature to help you plan, price, report on, and analyze your product inventory by categorizing inventory items in your enterprise.

A Merchandise Hierarchy Version record contains all the levels included in a hierarchy definition for a specific time period.

The Merchandise Hierarchy Version record is available only when the following features are enabled:

For help working with this record in the UI, see Merchandise Hierarchy.

The internal ID for this record is merchandisehierarchyversion.

See the SuiteScript Records Browser for all internal IDs associated with this record.

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 help topics:

Supported Script Types

Client SuiteScript is not supported for this record. It is scriptable in server SuiteScript only.

Supported Functions

The Merchandise Hierarchy Version record can be read, created, updated, deleted, and searched using SuiteScript.

Subtabs

The following subtabs are scriptable for this record:

Usage Notes

To assign levels to a merchandise hierarchy version, you must first create the levels.

Code Sample

The following sample shows how to create a new Merchandise Hierarchy Version record:

          require(['N/record'], function(record){
    var version = record.create({
        type: record.Type.MERCHANDISE_HIERARCHY_VERSION,
        isDynamic: true
    });
    version.setValue({
        fieldId: 'name',
        value: 'Version 1'
    });
    version.setValue({
        fieldId: 'description',
        value: 'Description of Version 1'
    });
    version.setValue({
        fieldId: 'startdate',
        value: new Date('1/1/2030')
    });
    version.selectLine({
        sublistId:'hierarchylevels',
        line: 0
    });
    version.setCurrentSublistValue({
        sublistId: 'hierarchylevels',
        fieldId: 'isincluded',
        value: true
    });
    version.commitLine({
        sublistId: 'hierarchylevels'
    });
    version.save();
}); 

        

Related Topics

Merchandise Hierarchy
Working with the SuiteScript Records Browser
SuiteCloud Supported Records
Lists
SuiteScript 2.x Scripting Records and Subrecords
SuiteScript 2.x Custom Forms
N/record Module

General Notices