Planning Item Group

Planners want to specify which items are in a plan at the item category or item level. A planning item group provides a reusable (across different plans) method for specifying a set of items to be planned together.

For help working with the planning item group record in the UI, see Planning Item Group.

The internal ID for this record is planningitemgroup.

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

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

Supported Script Types

The planning item group record is scriptable in server and client SuiteScript.

Supported Functions

The planning item group record can only be created, read, updated, deleted, searched, and copied. It cannot be transformed.

Supported Sublist

Item sublist record ID – ITEM_FS_TAB

Usage Notes

To work with the planning item group 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 planning item group record using SuiteScript 2.x:

          require(['N/record'], function(record) {
    var planningItemGroup = record.create({type :'planningitemgroup', isDynamic : true});
    planningItemGroup.setValue({fieldId:'name',  value :'Planning Item Group Name');

    planningItemGroup.selectNewLine({sublistId : 'planningitems'});
    planningItemGroup.setCurrentSublistValue({sublistId : 'planningitems', fieldId : 'itemtype',        value : 'ITEM' ,  ignoreFieldChange : false});
    planningItemGroup.setCurrentSublistValue({sublistId : 'planningitems', fieldId : 'itemorcategory',  value : ITEM_ID , ignoreFieldChange : false});
    planningItemGroup.commitLine({sublistId :'planningitems'});

    planningItemGroup.save();
}); 

        

Related Topics

General Notices