Hi, this is a suitescript sample in PDF. for getti...
# suitescript
r
Hi, this is a suitescript sample in PDF. for getting the sublist value const sublistData =         scriptContext.request.parameters.sublistdata.split(delimiter); is sublistData by default provided by netsuite to grab sublist values..?
s
This is specifically for Suitelets when the after submitting the form.
in this case, sublistdata would be a url parameter like
&sublistdata=1,2,3,4
If you need to get sublist information from a user event or client script, you will need to take a different approach
w
I would use ServerRequest.getSublistValue(options) to iterate on my Suitelet sublist line(s)
r
Yeah I know, but I didn't see anywhere mentioned about sublistdata, so I had a doubt
b
honestly its a questionable method
r
@battk why they have used in official document, I think it's a alternative used for getsublistval. I mean it's okay i guess.
b
getSublistValue lets you get away with not learning how netsuite represents data in a form post
and increases the chances that your code will work in the future if netsuite decides to change the representation
👍 3
💯 1