Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
Inventory Detail for Item Receipt
Hi,
I am having a problem of creating Item Receipt from a Purchase Order. The Item Receipt should have inventorydetail. But when I try it through nlapiTransformRecord function. An error prompt appears: itemReceipt.editCurrentLineItemSubrecord is not a function.
Here is my code.
var itemReceipt = nlapiTransformRecord("purchaseorder", 77, "itemreceipt");
//itemReceipt.setFieldValue("landedcostperline", "T");
for( var i = 1, lineCount = itemReceipt.getLineItemCount("item") ; i <= lineCount ; i++ ) {
itemReceipt.selectLineItem("item", i);
itemReceipt.setCurrentLineItemValue("item", "itemreceive", "T");
itemReceipt.setCurrentLineItemValue("item", "quantity", '200');
//itemReceipt.setCurrentLineItemValue("item", "rate", thisLinesRate );
var inventorydetail = itemReceipt.editCurrentLineItemSubrecord("item", "inventorydetail");
if( inventorydetail == null )
inventorydetail = itemReceipt.createCurrentLineItemSubrecord("item", "inventorydetail");
inventorydetail.selectNewLineItem("inventoryassign ment");