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.
NetSuite has launched SuiteSuccess Wholesale Distribution Edition, in Japan. Please join us the webinar on February 12 that introduces NetSuite solution with demos and case studies for Wholesale Industry.
Register Now
Have questions or experiences to share? Post your Release 2026.1 questions and join discussions in the Release 2026.1 category.
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");