Planned Order

Planned Orders are created by the supply planning process. You can also create a planned order from the supply planning workbench.

For help working with the planned order record in the UI, see Creating a Planned Order.

The internal ID for this record is plannedorder.

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:

Supported Script Types

The planned order record is scriptable in server and client SuiteScript.

The following initialization parameters are required to create a planned order:

Supported Functions

The planned order record can only be created, read, updated, deleted, and searched. It cannot copied or transformed.

Usage Notes

To work with the planned order record, you must enable material requirements planning. To do this, go to Setup > Company > Enable Features. Check the Material Requirements Planning box under Items & Inventory.

Code Samples

SuiteScript 2.x

The following sample shows how to create a planned order record using SuiteScript 2.x:

          require(['N/record'], function(record) {
    var plannedOrder = record.create({type :'plannedorder', 
    isDynamic : true,
    defaultValues: {
        supplyplandefinition: PLAN_DEFINITION_ID, 
        supplyplanningrun: PLANNING_RUN_ID,
        firmed: 'T'
    }});
    plannedOrder.setValue({fieldId:'item',              value : ITEM_ID});
    plannedOrder.setValue({fieldId:'location',          value : LOCATION_ID});
    plannedOrder.setValue({fieldId:'transactiontype',   value : 'TrnfrOrd'}); // can be either 'TrnfrOrd', 'WorkOrd' or 'PurchOrd'
    plannedOrder.setValue({fieldId:'startdate',         value : START_DATE});
    plannedOrder.setValue({fieldId:'enddate',           value : END_DATE});
    plannedOrder.setValue({fieldId:'quantity',          value : PLANNED_ORDER_QTY});
    plannedOrder.setValue({fieldId:'sourcelocation',    value : SOURCE_LOCATION_ID});
    plannedOrder.save();
}); 

        

Related Topics

Creating a Planned Order
Working with the SuiteScript Records Browser
SuiteScript Supported Records
Items

General Notices