Category Archives: Dynamics AX 2009

How to find by X++ code On Hand Stock for an Item

The example below show how to find On Hand Stock quantity for and Item

Executing SQL statements from X++

Example #1: Retrieve data:

Example #2: Edit data (delete):

How to get day month year from date in AX X++

Get field label in X++

With this little example we can get the Label assigned to Field Table

Change the table properties by using X++ code

How to get current company in Axapta AX 2009

You can get, in AX 2009, the current company using this code:

Count Records in Query in AX 2009 / 2012

Whith the following code you can retive the count of rows selected by Query Object

How to refresh the data source of caller form X++ AX 2009

Sometimes you need to refresh the caller form data source to show to the user the loaded or modified data.
So, you can proceed like this:

X++ How to import data from a csv file

In this example we import our items in the InventTable

Create a custom lookup on a StringEdit in AX 2009

We are going to perform a custom lookup in a StringEdit control.
In order to do that we must follow this points:

  1. Create a Form
  2. Add a StringEdit control
  3. Override lookup() method