I was trying to find out the internal id of the item sublist in Site Category screen. But wasn’t able to find any solution from the NS help center.
After a little bit of research, found “presentationitem” will be the sublist internal id instead of “item”. And also for the item column.
Code:-
var loadCategory = nlapiLoadRecord("sitecategory", "1234"); //--- Load the site category record. var presentationItemID = loadCategory.getLineItemValue("presentationitem", "presentationitem", lineIndex); //--- To get the value. loadCategory.setLineItemValue("presentationitem", "presentationitem", lineIndex, "1234 INVTITEM"); //--- To set a line. loadCategory.removeLineItem("presentationitem", lineIndex); //--- To remove a line item.
NOTE: While adding a new line item to the record you need to use “presentationitem” as the sublist column internalid. If you use “item” it gives an error.