Announcements
Hi,
While scheduling interview in Ax there is a functionality where outlook page opens to schedule the interview for candidate, I am facing com.variant error while doing this
"number of argument provided is diffrent from number of argument accepted by the method"
When I debugged this issue came to know that when ax code tries open outlook page the namespace donot get initialize in some cases means out of 10 cases this issue come for 2
What could be possible reason for this.. Please suggest
Hi Shilpa,
Did you solve your problem?
Hi Shilpa,
This might occur sometimes when AX starts a long COM operation so it's busy and won't respond to the Windows OS which assumes that AX has stopped responding and replace AX window with a ghost window. This disrupts the COM operation. I guess this might be the reason you are getting this error especially that it's not occurring always but 20% of the time. Try to turn ghosting off for AX client by running AX client in compatibility mode for Windows XP (SP2)
Also If turning ghosting off didn't solve it, try to initialize the namespace before the line on which you are getting the error, better if you put it in a try catch block and retry for a specific number of times to initialize in case AX client was ghosted in the moment the code is run.
Also check if this hotfix applies to you depending on your version of AX and outlook: link
Regards
Is this a standard functionality or some customization?
In either case, could you tell which class/method it is, and share the code?
André Arnaud de Cal...
294,206
Super User 2025 Season 1
Martin Dráb
232,968
Most Valuable Professional
nmaenpaa
101,158
Moderator