I'm hoping someone can help. I recently wrote a SuiteScript 2.0 project. The primary suitelet displays transaction/customer info in a sublist that has a SublistType of LIST. Right now we're displaying 750 records in the list at a time, but there can potentially be hundreds or even thousands of additional records, so the users want to have a Next and Previous button that will allow them to cycle to the next page of results.
The problem is that I cannot seem to update that sublist for the life of me. The fields on the sublist are all text fields except for one checkbox. Inside of a CLIENT SCRIPT, I've been trying things similar to the code below. (I removed all but one of the setCurrentSublistValue calls to shorten the code):
var currentRec = currentRecord.get();
currentRec.selectLine({
sublistId: 'custpage_studstatement',
line: 0
});
currentRec.setCurrentSublistValue({
sublistId: 'custpage_studstatement',
fieldId: 'custpage_show',
value: false
});
currentRec.commitLine({sublistId: 'custpage_studstatement'});
It will spin through all of the sublist items, but ONLY the checkbox gets updated. None of the text fields change, and no exceptions are thrown.
If I change the sublist to type EDITOR, I can update all of the fields on the line without a problem. It basically behaves they way I want it to. Also, if I change the FieldDisplayType on any of the text fields, I can then update those individual fields, but neither of those options are acceptable. We don't want the users to be able to edit those fields/lines like that. The LIST sublist is the one we want, but I'm beginning to think you cannot update LIST sublists from a client script, even though the docs suggest that you can. (although it's not definitive. The docs are a bit sketchy)
So I guess I'm mostly just looking for a high level answer, because I'm not sure I'm even approaching this correctly. If you have a custom sublist that is just a LIST, how would you add the ability to page through to the next set of results? Should updating that sublist be done in the client script? If so, how? Or should it be in the suitelet? And if so, how? (I've tried some various things in the suitelet as well, but I'll omit that to keep this from getting any longer) Thanks in advance