lost of selected record on saveData

Hi,

I’m having a strange issue when saving a record.
The moment before the function ```
databaseManager.saveData()


At that time

forms[‘salesorderline_dtl’].foundset.getSelectedRecord()

returns e.g. article_333

Then I call```
databaseManager.saveData()
``` and the selected record has changed to the first record of that foundset (index 1) and this returns article_001

I can't give any more information since it is simply located on this one line of code.
In all other saves this behavior does not appear, only in one particular case but I really can't see why...

Does someone know what causes the lost of the selected record in the saveData?

Thank you!

it shouldn’t normally happen, but i can think of one way when this could happen
and that is why that foundset is a relation and when you save data some records are falling out of in that relation. So that foundset is really updated.
Maybe you can see if the size is also changing of that foundset.
Or has that form suddenly a different foundset (because it is related) and because you save something its parent is changed and you get a new related foundset in that sub/tabpanel form.

Maybe a table or foundset filter jumping in here?