Having an odd issue. Basically - we have Opportunity records that are created with no line items which we are trying to update later via user event. We are getting the following SS1.0 error when attempting to edit the opp and insert the appropriate line:
SSS_INVALID_SUBLIST_OPERATION: You have attempted an invalid sublist or line item operation. You are either trying to cannot access a field on a non-existent line or you are trying to add or remove lines from a static sublist.
Code is very simple... User Event BeforeSubmit along the lines of:
var newRecord = nlapiGetNewRecord();
newRecord.selectNewLineItem('item');
newRecord.setCurrentLineItemValue('item', 'price', '1');
newRecord.commitLineItem('item');