Thursday 11 February 2016

X++ in AX7: Client/Server keywords

In AX7 all X++ code is running on the server tier. No exceptions. The compiler is ignoring client and server keywords.



When you come across any of these just delete them without a second thought:
  • Client and Server keywords
  • //AOSRunMode::xxx
  • xGlobal::ClientKind()
  • Dangling semicolons (but that is another story)

Similarly, if you stumble into any code that was taking the journey to the opposite tier to do some "magic" and then pack down the results in a container – consider refactoring the code.




The journey is not happening anymore, and it is pure overhead. Typically such methods are static methods named xxx_OnServer() or xxxClient().

No comments:

Post a Comment