Microsoft Dynamics AX Support

This blog contains posts by the Microsoft Dynamics AX Support teams Worldwide

Browse by Tags

Tagged Content List
  • Blog Post: Memory usage in XppIL code

    Written some X++ which seems to have high memory usage when run in IL but runs normally when not in IL? Or just noticing high memory usage in servers running IL code? Here we're going to talk about an aspect of garbage collection in XppIL that is important for anyone writing XppIL code to take on...
  • Blog Post: Accessing .NET global namespace from X++

    In case you need access a global namespace (object without namespace) like following definition, you could use a this X++ code. C# code: namespace KFEnumNamepace { public enum KFEnumNamespaced     {         ValueNA = 100,        ...
  • Blog Post: Creating General Journals in AX 2012 in X++

    Due to popular demand, below is example code that creates a general journal in 2012 using X++ code: AxLedgerJournalTable header = new AxLedgerJournalTable(); AxLedgerJournalTrans trans = new AxLedgerJournalTrans(); container ledgerDimensions, offsetDimensions; header.parmJournalName("GenJrn...
  • Blog Post: Threading in Dynamics AX

    Threading in AX 2009 is different from threading in C#. In C# you can spawn up threads and have them do whatever they do. The same thing is available in AX using the Thread class but it isn't the optimal or recommended way to spawn threads in AX. This is because AX has AOS instances and batches. When...
  • Blog Post: Wrong argument type for function

    When double-clicking on a record in a list page to see the details of that record in a task page/form and getting this error: Error executing code: Wrong argument type for function. With a stack trace of: (C)\Classes\QueryRun\setRecord (C)\Classes\FormDataSource\executeQuery Change the query...
  • Blog Post: Importing Employees in AX 2009

    To import employees via Excel use a concept similar to the import of customers and vendors but add additional tricks to get the Name and Search name fields from the DirPartyTable populated. (If you are unfamiliar with importing customers and vendors see KB article #960729.) When defining your Excel...
  • Blog Post: Changing the language at runtime in X++

    We recently had a case where the customer wanted to change the language being used for a given AX user at runtime. The customer had sorted out how to change the language displayed in forms and reports but the buttons on the navigation pane were not getting updated. Here is a way to handle this scenario...
  • Blog Post: Calling a web service from X++ code

    This post describes how to call the AIF sales order service from X++ code. The same approach can be used for calling any web service. In the AOT under the References node add a service reference specifying the wsdl location of the service, a .NET code namespace and a reference namespace. An example...
  • Blog Post: Research method on X++ forms

    In AX2009 if you call the research() method on a form passing true, the cursor position within a grid should be retained. However, this is true only if the query created by the form uses inner joins. Any outer joins, aggregations, temp tables, etc. cause the cursor to go to either the first or last record...
  • Blog Post: How to Identify the Tier X++ Code is Running On

    It can be unclear as to which tier, either the client or the server, X++ code is executed on. This ambiguity can lead to problems. For instance if you run a server-bound batch, all of the code has to run on the server. If a call is attempted on the client this error will be thrown: "The server-side impersonated...
  • Blog Post: How to Send the Callstack to the Infolog

    When troubleshooting a problem it is helpful to have the X++ callstack especially in scenarios where you cannot use the debugger in the environment or the issue happens sporadically. The following X++ code will retrieve the X++ callstack and send it to the infolog. Add the example code to a method that...
Page 1 of 1 (11 items)