I execute some code in one of my forms and the form is in one of my tabs.
The workflow is so that I may or may not click on the tab before I run my code.
The problem I am having happens when I run the code before clicking on the tab (before loading/showing that form) and the problem is that foundset.getRelationName() returns null.
I tried to trigger the form loading in code before running the function but it doesn’t seem to affect things.
Any ideas on why it happens and whose fau… err… what to do?
maria.kyselova:
Any ideas on why it happens and whose fau… err… what to do?
The problem is always between the keyboard and the chair
Anyway… when you run the code on your form before it is shown on the tab, the relation you specified on that particular tab isn’t applied yet to the foundset.
That’s why it’s returning null.
There’s no way you’re gonna change that, except showing the form on the tabpanel first.
The real question is: why do you need that relation so badly on the form itself?
Code should run fine from any context your form is in, otherwise I’d think about different architecture…