Planning View

NetSuite Supply Planning enables you to create a Planning Workbench View which can consist of pre-set filters and an embedded item saved search. The item saved search can include item-related criteria, such as item location and preferred supplier.

The internal ID for this subrecord is planningview.

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 NetSuite Help Center.

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

Prerequisites

The Material Requirements Planning feature must be enabled.

Supported Script Types

The planning view record is scriptable in both client and server SuiteScript.

Supported Functions

The planning view record can be created, read, edited, copied, deleted, searched, and transformed using SuiteScript.

Code Samples

The following sample shows how to create an inventory count record with an associated inventory detail record for a lot-numbered or serialized item.

SuiteScript 2.0

              require(['N/record'], function(record) {
    // Create an object to hold name data for the contact
    const nameData = {
        exception: 'PAST_DUE_SUPPLY',
        supplyreplenishmenttype: 'MRP',
        action: 'CANCEL',
        demand : 'FORECAST_DEMAND',
        supply : 'PLANNED_WORK_ORDER',
        relativeenddays : '180'
    };

    // Create a planning view record
    var objRecord = record.create({
        type: 'planningview',
        isDynamic: true
    });

    objRecord.setValue({
        fieldId: 'name',
        value: 'Planning View 2'
    });

    for (var key in nameData) {
        if (nameData.hasOwnProperty(key)) {
            objRecord.setValue({
                fieldId: key,
                value: nameData[key]
            });
        }
    }
    var recordId = objRecord.save();
}); 

            

Related Topics

Planning Rule Group
Reallocate Items
Working with the SuiteScript Records Browser
SuiteScript Supported Records
Items

General Notices