Hi all, I have a question about suitelet. To the p...
# suitescript
b
Hi all, I have a question about suitelet. To the point being I can actually create a Suitelet form that includes sublists and i can fill the desired sublist fields by using saved search. However, I want my suitelet to do something like returning the selected lines but I couldnt figure it out how? Does it related the GET-POST operation in suitelet or something else?
g
However, I want my suitelet to do something like returning the selected lines but I couldnt figure it out how
sorry, don’t understand what you’re asking here
b
Sorry for confusing message. Well, as I mentioned, I created a sublist with checkboxes and i want to take the checked lines and use it for further purposes.
g
ok so you could use a client script to keep track what is in play based on the checkbox value. probably
fieldchanged
here, but it depends upon the list type you use. (if it’s a listtype that requires the user to locally commit then
fieldchanged
will lie to you). anyway, now that you know which lines are in play you have enough information to build a request. a POST with body data seems best fit here. You can submit back to the same suitelet deployment if your
onRequest
can recognize the difference in the
request
or you can use a different one. up to you.
b
thx for the answer i will try my best 🙂
b
usual answer is that the submit button submits the entire form and you filter out which lines you process in the suitelet
g
yeah it still isn’t clear to me what the special case is here — if we’re talking about checked lines in total or lines that were just checked in this client interaction and what is “further purposes”. but if it’s lines that are checked regardless of when/who the answer is much more straigthtforward
e
I use a combination of 2 Suitelets and 1 client script. The first suitelet is the main one that collects data and the client script takes care of the checkbox selection to collect the internal ids that is passed to the second suitelet for processing the data from a POST request by the client script.