Does anybody have an example restlet for creating ...
# suitescript
k
Does anybody have an example restlet for creating an item group or itemkit, I've spent a lot of time trying and it always has the error: "Please select member items before submitting." Using standard Netsuite Record restlet
k
did you trying creating through UI first ?
how are you submitting member items corresponding to Kit ?
b
im with kevin here, your error is telling you that you need to set your mandatory sublists
k
Yeah I've done it manually through UI, then I checked out the fields using chrome addon and the reference page
Do I need to commit the item, then add sublist ?
b
do you know how to work with sublists
k
something like this ? record.selectNewLineItem('members'); record.setCurrentLineItemValue('itemmember', 'item', 9336);
I've only done it once
b
thats the annoying way that i would recommend using when the standard ways fails
k
Yes, you have to use commit based on type of mode ur using, whether it is dynamic or standard.
k
Use Dynamic and follow @battk script
b
read up on how sublists work, there are 2 ways to choose from
k
Did battk send a script , it looks like Kevin said to use a script before you posted the netsuite help center
b
no script from me for this one. your problem is more that you dont have any code to set sublist fields
which suggests that you dont know how to work with sublists, thus me pointing you to the sublist help
k
👍 Okay I'll try to read and figure out how to handle sublists
k
Untitled
@Kevin Weitzner Add above code under Dynamic
Change parameters
k
oh wow thank you, Ill try it out as soon as I can - that should help immensely.
👍 1
Thank you, I was able to figure it out using the example you sent yesterday.