In the suitelet page, for the sublist type “STATIC” the mark all button will not work bcoz data on the static sublist is not actually part of a record and therefore not accessible to suit script, is not submitted with the record when the record is saved.
For this, you can add one field to the sublist, which helps you to mark/unmark all lines under the sublist.
sublist.addField({
id: "custpage_select",
type: serverWidget.FieldType.CHECKBOX,
label: "Select",
});
later you can apply script on that field which will help you to mark/unmark all sublist lines.
There is an advantage for the static sublist type, the page index will get updated automatically to the sublist without even mentioning anything in the script.