Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Error: Operand types are not compatible

(0) ShareShare
ReportReport
Posted on by

5342.pastedimage1632488080746v1.pngIn Ax 2012

  • Suggested answer
    ergun sahin Profile Picture
    8,816 Moderator on at
    RE: Error: Operand types are not compatible

    The error you get is not normal. I tried it in a job, I didn't get any error (it's normal, both sides of the operator have the same type of object).

    It looks like customaziton has been made on your system. It is not easy for us to support you in this matter. My guess is they didn't change the return value, but you can get errors like this if the code of one of the related objects in the inherited objects was changed and not compiled forward.

    What you need to do is find the relevant object and compile it forward or compile the whole system (with parallel compilation)

  • Community Member Profile Picture
    on at
    RE: Error: Operand types are not compatible

    didn't get it

  • Suggested answer
    ergun sahin Profile Picture
    8,816 Moderator on at
    RE: Error: Operand types are not compatible

    There is no problem in use. If any object has custom code, try forward compiling (addNew return AfStronglyTypedDataContainer and class extends AfStronglyTypedDataContainer)

    pastedimage1632736138819v1.png

  • Community Member Profile Picture
    on at
    RE: Error: Operand types are not compatible

    Well As I am new to this hcmWorkerImport_HcmWorker is class as you can see 
    Screenshot-2021_2D00_09_2D00_27-133651.png

  • André Arnaud de Calavon Profile Picture
    293,274 Super User 2025 Season 1 on at
    RE: Error: Operand types are not compatible

    Hi Mobeen,

    Can you tell what object is behind the variable 'hcmWorkerImport_HcmWorker'? Is it the same object as returned by the 'addNew()' method?

  • André Arnaud de Calavon Profile Picture
    293,274 Super User 2025 Season 1 on at
    RE: Error: Operand types are not compatible

    Moved to the Dynamics AX forum.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February 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... 293,274 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,947 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans