and this is the alternate method of removing all l...
# suitescript
i
and this is the alternate method of removing all line items and then readding them, but still the same issue
Copy code
for (var i = itemCount; i > 0; i--) {
        nlapiRemoveLineItem('item', i);
    }

    for(var x=0;x<baseItems.length;x++) {

        var itemId2 = baseItems[x];
        nlapiLogExecution('DEBUG', 'itemId2', itemId2);

        nlapiSelectNewLineItem('item');
        nlapiSetCurrentLineItemValue('item', 'item', napaItems[itemId2].napaItemId);
        nlapiSetCurrentLineItemValue('item', 'custcol_to_adj_item_interchange', napaItems[itemId2].baseNumberId);
        nlapiCommitLineItem('item');
    }