Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

Com variant error

(0) ShareShare
ReportReport
Posted on by 5

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

  • Andre Ghazaleh Profile Picture
    870 on at
    RE: Com variant error

    Hi Shilpa,

    Did you solve your problem?

  • Suggested answer
    Andre Ghazaleh Profile Picture
    870 on at
    RE: Com variant error

    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

  • nmaenpaa Profile Picture
    101,158 Moderator on at
    RE: Com variant error

    Is this a standard functionality or some customization?

    In either case, could you tell which class/method it is, and share the code?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,206 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,968 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans