Item Supply Plan

The internal ID for this record is itemsupplyplan.

This record includes the Orders sublist.

For help working with this record in the UI, see Creating Item Supply Plans and Item Supply Plan Import.

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

The item supply plan is scriptable in both client and server SuiteScript.

Supported Functions

The item supply plan record is fully scriptable — it can be created, copied, updated, deleted, and searched using SuiteScript.

Usage Notes

The item, location, and units body fields cannot be changed in update operations.

An item supply plan's receiptdate cannot be earlier than the orderdate.

The ordercreated field is read-only. It is set to True when an order is generated from an item supply plan.

Code Samples

The following sample creates an item supply plan.

          function createItemSupplyPlanMinimal() {
    var itemsupplyplan = record.create({
        type: record.Type.ITEM_SUPPLY_PLAN,
        isDynamic: true
    }) 
    itemsupplyplan.setValue({
        fieldId: 'subsidiary',
        value: 1
    }); 
    itemsupplyplan.setValue({
        fieldId: 'location',
        value: 1
    }); 
    itemsupplyplan.setValue({
        fieldId: 'item',
        value: 165
    }); 
 
    itemsupplyplan.setValue({
        fieldId: 'memo', 
        value: 'memotest'
    }); 
    itemsupplyplan.setValue({
        fieldId: 'unit',
        value: 3
    }); 
 
      itemsupplyplan.selectNewLine({
        sublistId: 'order'
    });
    itemsupplyplan.setCurrentSublistValue({
        sublistId: 'order',
        fieldId: 'orderdate',
        value: '05/05/2012'
    }); 
    itemsupplyplan.setCurrentSublistValue({
        sublistId: 'order',
        fieldId: 'receiptdate',
        value: '5/8/2012'
    }); 
    itemsupplyplan.setCurrentSublistValue({
        sublistId: 'order',
        fieldId: 'quantity',
        value: 1
    }); 
    itemsupplyplan.setCurrentSublistValue({
        sublistId: 'order',
        fieldId: 'ordertype',
        value: 'PurchOrd'
    }); 
 
    itemsupplyplan.commitLine({
        sublistId: 'order'
    });
 
    var id = itemsupplyplan.save();
} 

        

The following sample updates an existing item supply plan.

          function updateItemSupplyPlan()
{
    var itemsupplyplan = record.load({
        type: record.Type.ITEM_SUPPLY_PLAN,
        id: 3
    });
      itemsupplyplan.setValue({
        fieldId: 'memo',
        value: 'memotest2'
    });   
   
      itemsupplyplan.setSublistValue({
        sublistId: 'order',
        fieldId: 'receiptdate',
        line: 4,
        value: '11/3/2012'
    }); 
      var id = itemsupplyplan.save(); 
} 

        

Related Topics

Creating Item Supply Plans
Item Supply Plan Import
Working with the SuiteScript Records Browser
SuiteCloud Supported Records
Transactions

General Notices