I am working on some AX existing forms where I have to add new .NET control. This .NET control have some custom web service logics and I plugged it with form correctly. Now I am facing performance issue. When Form is loading it takes too much time to load this .NET control. Is there any way other then Threading from which when form is loading, this .NET control will load in background process and once this .NET fully loaded it will display in desired Form.
It all depends on what exactly is slow. My guess it that you’re calling the web service synchronously from the UI thread and the whole form waits for the web service.
If this is the case, the design of your application is wrong - you should call the web service asynchronously.
Martin Yes, I understand but I am restrict to use web service calls as it is. is there anyway I can mark this call to async? Also I have to pass some reference objects to the static method that’s why I am unable to use Thread as thread have parm of type container which is value type. Please pointer me an further suggestion.
Asynchronous calls are supported by WCF out of the box. Look at How to: Call WCF Service Operations Asynchronously.
Forget about the Thread class in X++ - you have many times better options in .NET.