Clear multiple selection

Hi,
I created a form using solution Model. I set auto save to “false”. I need add a check box in front of each row. Since I didn’t find how to set calculations I added a field called “selected” in the sql like this: var sql=‘select a.id, a.name, b.type, c.long_name, to_char(0) as selected from a, b, c where…’.
When I click a check box and then click the function clearSelection() it works. But if I check a box and then click another button to open another form and close that form, now if I click clearSelection() it doesn’t work. It did remove the selected index from the array(I have an array to save all index of the selected rows) but the box was still checked. It just doesn’t work in v4.1.1 but it works in v4.1.0. The following is the clearSelection():

function clearSelection()
{
	  var form = application.getMethodTriggerFormName();
	  selectedIds = globals.multi_select_get_selection(form);
	  selectedNum = utils.numberFormat(selectedIds.length,'#'); 
	 
	  if (selectedNum > 0)
	  {
		 databaseManager.setAutoSave(false);
	         databaseManager.rollbackEditedRecords(); 
	     
		 globals.multi_select_none(form);    
	         forms[form].foundset.relookup(); 
	  } 
}

Can somebody help me with this?

Thanks,