Counting the number of records in a QueryRun

  • March 9, 2010
  • 0 Comments

When you want to count the number of records that are currently displayed on a form, and you have only one data source, just call the static method countTotal() from the SysQuery-class. public void executeQuery() { ; super(); info(int2str(SysQuery::countTotal(EmplTable_ds.queryRun()))); }public void executeQuery() { ; super(); info(int2str(SysQuery::countTotal(EmplTable_ds.queryRun()))); } But when you want to do the same … Continue Reading

The Args class

  • March 8, 2010
  • 0 Comments

The args class is probably the class u use most in Ax, and this probably even without knowing. This class is used to give arguments from one object to a new object. For example when you click on a menu-item to open a class, the menu-item will pass a args-object to Main-Method of your class. The … Continue Reading

strrep vs. strreplace

  • March 7, 2010
  • 0 Comments

In Ax the name of Methods are sometimes (by my opinion) not so clear chosen. For example, when I try to replace a string in ax by typing strrep(..) instead of strreplace(..). strrep –> repeat a certain string for X times. strreplace –> replace a certain string. So please chose clear names for your methods…

About classes

  • March 6, 2010
  • 0 Comments

In this post I will talk about classes and what you can do with them. Abstract class When you create a abstract class, you want to ensure that this class can not be instantiated. You wil have to create a sub-class that wil actually use the functionality. Example: abstract class MyClass { }abstract class MyClass … Continue Reading

List of mandatory fields on a table

  • February 22, 2010
  • 0 Comments

When you want a list of all the mandatory field on table X, yould check all the properties on the table fields, or you could be lazy and write a small job that does the trick for you. Just replace TableId with your tablenum. 1 2 3 4 5 6 7 8 9 10 11 … Continue Reading

Microsoft Dynamics AX 2009 Development Cookbook

  • February 21, 2010
  • 0 Comments

Just like my colleague Klaas Deforche, I am now reading the ‘Microsoft Dynamics Ax 2009 Development CookBook‘ published by ‘Packt Publishing‘ that was published December 2009. It is a verry good book to look up a problem and find the correponding solution. TOC: Preface Chapter 1: Processing Data Chapter 2: Working with Forms Chapter 3: Working … Continue Reading

Code Editor – shortcuts

  • February 20, 2010
  • 0 Comments

Underneed you find the list of shortcuts I use most in Microsoft Dynamics Ax while developing. General (shortcuts I also use outside AX) CTRL + S : Save. CTRL + C : Copy text to clipboard. CTRL + X : Cut text to clipboard. CTRL + V : Past text from clipboard. CTRL + A : … Continue Reading

Working with numbersequences – On forms

  • February 18, 2010
  • 0 Comments

When you want to implement NumberSequences in a Ax form (new numbersequence when you create a record etc.) you can just implement the ‘numberSeqFormHandler’. Step-by-step:

Working with numbersequences – Keep In Mind

  • February 17, 2010
  • 0 Comments

When you are using a Number Sequence, keep in mind that a Continuous Number Sequence is slower than a non-continuous. The reason is that the system creates a record in the table NumberSequenceList (with the status Active) and cleans it up later during TTSCOMMIT. Performance tip: You can improve the performance of a process that creates many … Continue Reading

Working with numbersequences – New Module

  • February 16, 2010
  • 0 Comments

In a previous post I explained how to create a new Number Sequence in a existing module (Working with numbersequences – new NumberSequence). In this post I will explain how you can create a new Number Sequence-module. I will create a new module called TEST (lack of inspiration). Step-By-Step: