Moderator
Has successfully completed the online course Intermediate (200)
Has successfully completed the online course Advanced (300)
Has successfully completed the online course Basics (100)
Has successfully completed the online course Advanced (310)
Has successfully completed the online course Advanced (320)
Has successfully completed the Intermediate Certification
Has successfully completed the Advanced Certification 2 years, 10 months ago
#35409
::
Hi Vasileios,
There is no built-in function that resets all elements on a screen, but you can implement it the following way:
Subscribe to the ‘onBeforeShow’ event of the screen you want to reset. After the event, execute this code (adapt it to your use case):
var aCheckboxes = $("#ScreenID").find(".sapMCb"); // get all checkboxes on the screen
for (var i = 0; i < aCheckboxes.length; i++) {
var sId = aCheckboxes[i].id; // get the ID of the element
sap.ui.getCore().byId(sId).setSelected(false); // reset the checkbox
}