I would like to trigger some data re-lookups from a plugin context.
I have a basic cascading sequence where field A acts as a key for a lookup for field B; and field B then acts as a key for a lookup for field C.
I know that when I use a form directly as a human user and I enter content inot field A, then fields B and C are automatically looked up in sequence a you would expect. This occurs whether the form is standalone or embedded inside another form.
I want to achieve that from a java method in my plugin.
So, I have the following piece of code:
final IForm currentForm = _iapplication.getFormManager().getCurrentForm();
currentForm.reLookupValues();
However, I find that calling this once (and even twice), from either the event dispatch thread or from a worker thread, typically does not perform the relookup successfully. Often it will update field B, but rarely does field C ever get updated.
The behaviour is the same regardless of whether the target form [containing fields A, B and C] is primary or embedded.
Any thoughts ?