<@U38PGCNGN> I am creating inventorydetail in this...
# suitescript
h
@rustyshackles I am creating inventorydetail in this line:
Copy code
fulfillmentRecord.getCurrentSublistSubrecord({ sublistId: 'item', fieldId: 'inventorydetail' });
I have only 1 item on that order and it is regular inventory item.
r
You usually need more than one line to create the inventory detail sub record. here is an example from Help. I was only able to find a complete 1.0 example.
Copy code
var compSubRecord = obj.createCurrentLineItemSubrecord('component',
     'componentinventorydetail');
 
        compSubRecord.selectNewLineItem('inventoryassignment');
        compSubRecord.setCurrentLineItemValue('inventoryassignment', 'binnumber', 3);
        compSubRecord.setCurrentLineItemValue('inventoryassignment', 'quantity', 2);
        compSubRecord.commitLineItem('inventoryassignment');
        compSubRecord.commit();
            
    obj.commitLineItem('component');
    var id = nlapiSubmitRecord(obj);