web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

AX 2012 X++ Override Method Ignored

(0) ShareShare
ReportReport
Posted on by

I'm new to AX and I'm in the process of trying to learn how insertUpdate() in DMFEntityBase works.  However, it looks like every time I close my instance of AX, AX seems to forget that I overrode the method.  A quick background:

  1. I've created a custom entity based on ForecastSales table using the provided wizard (to import data via DIXF).
  2. The wizard created a private project DMFForecastSalesEntity that contained the DMFForecastSalesEntityClass class.
  3. In this class I chose to override the insertUpdate() method.

After a few confusing session, I made a very simple test by simply changing

public Common insertUpdate(Common _target, boolean _callInsertLogic = false, boolean _callValidateLogic = false)
{

Common ret;

ret = super(_target, _callInsertLogic, _callValidateLogic);

return ret;

}

to (addition emphasize in red)

public Common insertUpdate(Common _target, boolean _callInsertLogic = false, boolean _callValidateLogic = false)
{

Common ret;

info('testing!');

ret = super(_target, _callInsertLogic, _callValidateLogic);

return ret;

}

After making, saving and compiling the change, importing via DIXF will display the info as expected.  However, if I close AX, reopen AX, and import again, the info will NOT display until I compile the class again.

I've already tried compiling the class and the entire project, but so far avoided compiling the entire AOT (it takes 2-3 hours).  Is compiling the entire AOT the key to this or am I missing something?

*This post is locked for comments

I have the same question (0)
  • MarkusR Profile Picture
    55 on at

    If you compile the class, it's done on your client. After restarting the client the client gets the last CIL from the ModelStore and you local class my be overwriten.

    Try the following:

    1. Disable the option "File / Tools / Options / Development / Execute Business Logic in CIL"

    This means that the X++ code is executed instead of the CIL. This only works if the code runs not in a batch (batches only executes CIL.

    2. Compile the fulle environment (if you're using > R2 CU7 you can use the axbuild programm in the bin-path of the server installation)

    Then create a full CIL. After that restart the server (the server gets the new CIL while starting)

    Sometimes the server does not get the new CIL, then you have to delete the CIL in the server patch.

  • André Arnaud de Calavon Profile Picture
    301,020 Super User 2025 Season 2 on at

    Hi Wor,

    Did you also perform a CIL compilation (full or incremental) after making changes?

  • Community Member Profile Picture
    on at

    Hi Andre,

    Thank you for your recommendations.  I tried performing both the incremental and full CIL compilation and I'm still running into the same issue.

  • Community Member Profile Picture
    on at

    Hi Markus,

    Thank you for the two recommendations.  I have not tried the first yet as I was planning on running the import as a batch job so that would make the first suggestion void in that case.  I have not tried the second method yet, but I will likely try it later today or next week and I'll report back.

  • Brandon Wiese Profile Picture
    17,788 on at

    Did you figure this out?

    I see this kind of strange behavior with corrupted AUC files sometimes.  Close the AX client and delete the AUC files and see if that resolves it.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans