This discussion is a follow up for this discussion:
(+) how to make checkbox readonly using H5 script - H5 Scripting - M3 - Customer & Partner Community - Infor Community
I summarized the findings as below:
With classic UI:
// fieldname example = "WRBPEX"
this.controller.ParentWindow.find('#' + fieldname).attr('disabled', 'true');
With new UI:
// fieldname example = "WRBPEX"
document.getElementById(fieldname).classList.add("disable-checkbox");
document.getElementById(fieldname + "-label").style.pointerEvents = "none";
As to say, old and new script cannot work with each other version, but can deploy together in a single H5 script without problem when loading it.
There is a problem to the new UI, doing any "Personalization" will render the script useless until refreshed again. I can report this so that we can have a better solution to disable "checked" checkbox.
Feel free to add on more details to make this a single-liner code to work on.