Strange omitRecord behavior with related records

Servoy 3.1.3 Developer running on OS X.

Not sure if this is a bug, but the behavior seems non-intuitive and I can’t figure a workaround.

I have a solution that holds forms within tabpanels, where Form A is a list view attached to Table A. There is a method attached to this form that loads a series of related child records from Table B into another form that displays in a tab panel (this is a relationless tab). The method in Form A executes this action using the loadRecords command. For example, while record 1 is selected in Form A, a method (Method A) with the following line is run to load Table B records into Form B:
forms.B.controller.loadRecords(relationA_to_B);

This all works fine, and all of the related records associated with record 1 in form A show up in Form B correctly.

Now, in form B the user omits one of the related records (or several) by running a method in form B that contains the line: controller.omitRecord();

This also works fine. The problem I have is recovering the original found set of related records for record 1. If I return to Form A, even after navigating around to other records, etc. and then select record 1 and run method A again, the records that are loaded back in Form B do not include the records that were omitted previously. In other words, the loadRecords(relationA_to_B) no longer returns the full set of related records - only the previously non-omitted records.

I can’t seem to figure out a way to get the solution to “forget” the previously omitted records in the related found set and retrieve the full set of related child records. I’ve tried:

forms.B.foundset.clear(); and forms.B.controller.loadAllRecords(); prior to loading the foundset via the relation, but this doesn’t fix the problem.The only way I’ve been able to recover the original found set of related records is to log out of the solution. I even tried clearing the client cache using one of the RawSQL methods. Nothing seems to work.

How do I get the solution to recover the original related-records foundset after one of those records had been omitted?

forms.B.controller.loadRecords()
should restore your related set (this info is also in the sample code)

BTW In Servoy 3.5 it will also be possible to call this on foundset itself.