我越来越
“TypeError _invadjtransRecord.createiewCurrentLineItemSubrecord 不是函数”
尝试以下代码时:
var _invadjtransRecord = nlapiCreateRecord('inventoryadjustment');
_invadjtransRecord.setFieldValue('subsidiary', _subsidiary);
_invadjtransRecord.setFieldValue('account', _itemAccount);
_invadjtransRecord.setFieldValue('trandate',dateVal);
_invadjtransRecord.selectNewLineItem('inventory');
_invadjtransRecord.setCurrentLineItemValue('inventory', 'item', _item);
_invadjtransRecord.setCurrentLineItemValue('inventory', 'location', _location);
_invadjtransRecord.setCurrentLineItemValue('inventory', 'adjustqtyby', _adjQuantity);
var inventoryDetail = _invadjtransRecord.createCurrentLineItemSubrecord('inventory','inventorydetail');
inventoryDetail.selectNewLineItem('inventoryassignment');
inventoryDetail.setCurrentLineItemValue('inventoryassignment', 'expirationdate', _expDate);
inventoryDetail.setCurrentLineItemValue('inventoryassignment', 'inventorystatus', 1);
inventoryDetail.setCurrentLineItemValue('inventoryassignment', 'issueinventorynumber', _invNo);
inventoryDetail.setCurrentLineItemValue('inventoryassignment', 'quantity', _adjQuantity);
inventoryDetail.commitLineItem('inventoryassignment');
inventoryDetail.commit();