Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

Form closed before a child form try to use it as a caller

$
0
0

Hi,

I have a hard time trying to fix this problem.

I have a form "FormA". On a specific event, it calls another form "FormB" like this:

Args   args = new Args();

args.caller(this);
new MenuFunction(menuItemDisplayStr(MenuItemFormB), MenuItemType::Display).run(args);

I'm using the caller in the FormB only to refresh the FormA in a specific situation that is not the problem.

The real problem happens when, while the FormB is still open, the FormA is closed by the user.

It's ok, but after, when the user close the FormB, the all AX client crash.

It seems that AX try to deallocate de FormRun in the args.caller at the end of the FormB.close method.

Actually, the args.caller() varaible still contain all the informations of the parent window FormA even if the form is closed.

If I don't initialize the caller before calling the menuFunction, it works perfectly so I'm sure it's related to that even if I don't have a single one line of code using it in the child Form.

To set the FormB Modal could fix the problem but it's not functionnaly desirable.

I searched really hard on the internet to find something to fix that, but I didn't find anything. 

If someone can help me on that one, it will be really appreciate.


Viewing all articles
Browse latest Browse all 72043

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>