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.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Update: Narrative Insights has been restored and is now available.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
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