Working with numbersequences – New Module

  • February 16, 2010

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:

Maximum value RecId

  • February 15, 2010

Did you ever wonder what the maximum value of a RecId was? In Ax3.0 it is pritty simple. You know that the RecId was a int value and with the function ‘maxInt()’, you get the value. In Ax4.0 and higher, the RecId is changed from a regular int to in64. There is no such function … Continue Reading

Line Number

  • February 13, 2010

When you want to create a table were you want to remain the position of the records you create (like the lineNum field on the SalesLine), you just need to define a field on your new table as a ‘CounterField‘. Step-by-step:

Select a record from a table when you only have the tableId

  • July 16, 2009
  • 1 Comment

The following code can provide you a generic way to update a table when you only have the tableId. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 public Common findRecord(TableId _tableId, RecId _recId, Boolean _forUpdate = false) { Common      common; DictTable   dictTable; ; dictTable = new DictTable(_tableId); common … Continue Reading

Using FilePath on a form

  • June 25, 2009
  • 1 Comment

When you want a filebrowser on your form and you only added a field that extends from the Extended Data Type FilePath, you wil get a stack-trace/error message when you click on the folder icon. Don’t panic, there is nothing wrong with your AX. Like the error explains you just need to provide the form … Continue Reading

Working with numbersequences – new NumberSequence

  • May 5, 2009
  • 1 Comment

When you want to create a new NumberSequence in AX you have to do the following steps: 1. Create a new Extended Data Type (EDT). Often this EDT extends from num. (this step is not mandatory, but it is a best practice) 2. Discide in witch module this new Number Sequence Reference (classes NumberSeqReference_…) should … Continue Reading

Type of Anytpe enum

  • April 14, 2009

Normaly you try to avoid using AnyType variables, but sometimes you are forced to use them. When you use a AnyType enum and you want to cast it to it’s actual data type, be sure you cast it to the right type to prevent stack-traces. You can get the enumId from a AnyType-enum by using … Continue Reading