Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
help with sublist manipulation in ss2
I have the following function called in an SS1 RESTlet that works correctly:
<span style="color:'#222222'"><span style="font-family:'arial'">[FONT=monospace, monospace][COLOR=#000000]function testCreateWo () {</span></span>[/FONT][/COLOR] <span style="color:'#222222'"><span style="font-family:'arial'"> </span></span> <span style="color:'#222222'"><span style="font-family:'arial'">[FONT=monospace, monospace][COLOR=#000000]var woRec, woId, itemCount, i,</span></span>[/FONT][/COLOR] <span style="color:'#500050'"><span style="font-family:'arial'">[FONT=monospace, monospace][COLOR=#000000]TEMPITEM = 25558,</span></span>[/FONT][/COLOR] <span style="color:'#500050'"><span style="font-family:'arial'">[FONT=monospace, monospace][COLOR=#000000]BUILDLOC = 22,</span></span>[/FONT][/COLOR] <span style="color:'#500050'"><span style="font-family:'arial'">[FONT=monospace, monospace][COLOR=#000000]WOFORM = 296,</span></span>[/FONT][/COLOR] <span style="color:'#222222'"><span style="font-family:'arial'">[FONT=monospace, monospace][COLOR=#000000]BLACK_ITEM = 4924,</span></span>[/FONT][/COLOR] <span style="color:'#222222'"><span style="font-family:'arial'">[FONT=monospace, monospace][COLOR=#000000]SCARLET_ITEM = 4974,</span></span>[/FONT][/COLOR] <span style="color:'#222222'"><span style="font-family:'arial'">[FONT=monospace, monospace][COLOR=#000000]QTY = 200;</span></span>[/FONT][/COLOR] <span style="color:'#222222'"><span style="font-family:'arial'"> </span></span> <span style="color:'#222222'"><span style="font-family:'arial'">[FONT=monospace, monospace][COLOR=#000000]woRec = nlapiCreateRecord('workorder', {'assemblyitem': TEMPITEM, 'customform': WOFORM});</span></span>[/FONT][/COLOR] <span style="color:'#222222'"><span style="font-family:'arial'">[FONT=monospace, monospace][COLOR=#000000]woRec.setFieldValue('quantity',QTY);</span></span>[/FONT][/COLOR] <span style="color:'#222222'"><span style="font-family:'arial'">[FONT=monospace, monospace][COLOR=#000000]woRec.setFieldValue('location',BUILDLOC);</span></span>[/FONT][/COLOR] <span style="color:'#222222'"><span style="font-family:'arial'">[FONT=monospace, monospace][COLOR=#000000]woRec.setFieldValue('memo','test memo');</span></span>[/FONT][/COLOR] <span style="color:'#222222'"><span style="font-family:'arial'"> </span></span> <span style="color:'#222222'"><span style="font-family:'arial'">[FONT=monospace, monospace][COLOR=#000000]itemCount = woRec.getLineItemCount('item');</span></span>[/FONT][/COLOR] <span style="color:'#222222'"><span style="font-family:'arial'">[FONT=monospace, monospace][COLOR=#000000]for (i = itemCount; 0