A blog offering various X++ code snippets and tips for Microsoft Dynamics AX

Tuesday, October 28, 2008

Dynamics Ax 2009 RCT

Here is a link to the Dynamics Ax 2009 Rapid Configuration Tool which is available to download from PartnerSource:

Click Here

The key features of this tool are:

Best Practice documentation for building partner Knowledge Base;
AX 2009 Data Import and Export;
Project Management via Microsoft Project Integration and Issue Tracking;
Alerts and Notifications;
Fast and Easy AX Configuration;

From MBS website:

This latest version of the RCT provides a newly generated set of activities for easier implementation of Microsoft Dynamics® AX 2009. In addition, it provides significant improvements to activity dependencies as well as the ability to detect circular dependencies among activities. The tool includes updated and expanded Best Practices documentation for Microsoft Dynamics® AX2009. MS Project import and export functionality has been improved along with the Installer which has been improved giving better error detection by capturing logs.

The RCT for Microsoft Dynamics® AX 2009 is a standalone installation of the RCT version originally provided as part of the previous Partner Productivity Toolkit.

Note: The Rapid Configuration Tool for Microsoft Dynamics® AX2009 is released as a separate tool from the Microsoft Dynamics® AX application and is not supported by Microsoft.

If you any questions or comments e-mail me on: mirko@mirkobonello.com

Dynamics Ax 2009 Exams

It seems that some MS Dynamics Ax 2009 exams are in the pipeline:

AX 2009 Development Introduction - November 20 2008

AX 2009 Enterprise Portal - November 26 2008

Keep up to date with the latest exams from Microsoft here.

If you any questions or comments e-mail me on: mirko@mirkobonello.com

Dynamics Ax 2009 Enterprise Portal Sample Code

To find some very good AX 2009 Enterprise Portal sample code in various formats:
Click Here

Some AX 2009 EP videos:
Click Here

A very good DAX 2009 EP blog:

Click Here

If I find some more AX 2009 useful resources I will append them to this post.

If you any questions or comments e-mail me on: mirko@mirkobonello.com

Using an AOT query in a form at runtime

This is not the recommended/standard way to use queries in forms but in case you might need it - here is how it can be done:

public void init()
  QueryRun queryRun;
  Args args = new Args();

  queryRun = classfactory.queryRunClass(args);

In the above snippet, inserted in the init() method of the datasource, a QueryRun and an Args object was created. The args.name property was set to the AOT query you want to use in your form and the queryRun was constructed using this args object. Finally the query of the datasource (remember that 'this', in the code snippet, is the current datasource) is set to the query of the QueryRun.

If you any questions or comments e-mail me on: mirko@mirkobonello.com

Dynamics Ax User Ranges

I recently received the following development question regarding Dyanmics Ax:

How to access the user specified ranges in a form i.e. the ranges set manually by the use, using right click 'Filter by field / Filter by selection' or using the advanced query button.

This is actually quite simple as shown in the following code:

public void executeQuery()
  Query query;
  int i;

  // get a pointer to the current query
  query = this.queryRun().query();

  // Traverse the ranges for the specified table in the query
  for (i = 1; i <= query.dataSourceTable(tableNum(custTable)).rangeCount(); i++)
    // For each range field found display the field name and value chosen by user
    info(strfmt("Field Name: %1 ", fieldid2name(tableNum (CustTable), query.dataSourceTable(tableNum(custTable)).range(i).field())));
    info(strfmt("Value chosen by user: %1", query.dataSourceTable(tableNum(custTable)).range(i).value()));

// Or perform any other work

The above code was written in the executeQuery() method of the DataSource to show the field names and values chosen by the user every time he makes a selection.

Tested on Ax 4.0 and 2009

If you any questions or comments e-mail me on: mirko@mirkobonello.com