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

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

sales order Error "Error executing code : Illegal Object code. Recompile Script.

(0) ShareShare
ReportReport
Posted on by 1,010

I am Getting error for particular user, while opening sales order that "Error executing code : Illegal Object code. Recompile Script. Stack trace (C)\Forms\SalesTable\Methods\init.  (C)\Classes\SysSetupFormRun\init-Line3" Please help.

*This post is locked for comments

I have the same question (0)
  • Sagnik Majumder Profile Picture
    792 on at
    RE: sales order Error "Error executing code : Illegal Object code. Recompile Script.

    Hi D.K.S.,

    I followed these steps and it solved my problem as well. Great fix.

    Thank you very much again.

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: sales order Error "Error executing code : Illegal Object code. Recompile Script.

    I was also facing same issue. Compile forward for the class has resolved my problem. Thanks

  • D.K.S. Profile Picture
    1,010 on at
    RE: sales order Error "Error executing code : Illegal Object code. Recompile Script.

    Thank you Iulian Cordobin and Denis Macchinetti. By compiling that form i solved it,. Thank you very much again,.

  • Verified answer
    D.K.S. Profile Picture
    1,010 on at
    RE: sales order Error "Error executing code : Illegal Object code. Recompile Script.

    Hi Andre, we have solved that issue.

    First I Reset user data from Tools | Options | usage data | Reset button.

    then I deleted *.auc file from Appdata folder.

    then after i compiled Forms\SalesTable\Methods\init and  Classes\SysSetupFormRun\init. then it works,.

  • André Arnaud de Calavon Profile Picture
    299,022 Super User 2025 Season 2 on at
    RE: sales order Error "Error executing code : Illegal Object code. Recompile Script.

    Hi Lulian,

    The question is tagged with AX4.

    Hi D.K.S.,

    Try to follow the reply from Denis first to focus initially only on the form.

  • Iulian Cordobin Profile Picture
    8,201 on at
    RE: sales order Error "Error executing code : Illegal Object code. Recompile Script.

    Just a question. What ax version is this and from your comment above, this is a live instance. Is this a clustered env.? Because if it is you may need extra steps if you think of compiling.

  • Denis Macchinetti Profile Picture
    16,444 on at
    RE: sales order Error "Error executing code : Illegal Object code. Recompile Script.

    Hi

    Instead of the Full Compilation, you can easily compile only the form SalesTable.

    For sure you will find an error.

    Fix it and go ahead.

    That's it!

  • André Arnaud de Calavon Profile Picture
    299,022 Super User 2025 Season 2 on at
    RE: sales order Error "Error executing code : Illegal Object code. Recompile Script.

    Hi D.K.S.,

    Try to recompile your application. As you mentioned it was for a particular user we tried to avoid this longer running task initially. After compilation see if there are any errors reported.

    Please update once you have the results.

  • D.K.S. Profile Picture
    1,010 on at
    RE: sales order Error "Error executing code : Illegal Object code. Recompile Script.

    Hi Andre and Faisel, Thanks for replying. I deleted *.auc file and i also done Reset of usage data but still it is showing error, while opening Sales Order.  Please Help.

  • André Arnaud de Calavon Profile Picture
    299,022 Super User 2025 Season 2 on at
    RE: sales order Error "Error executing code : Illegal Object code. Recompile Script.

    Hi D.K.S.,

    On my machine it is in the c:\users\[my username]\AppData\ folder. By default this folder is hidden by the operating system. You can either type the directory name or make it visible in the file explorer.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 4

#2
Guy Terry Profile Picture

Guy Terry 2 Moderator

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans