Internal Error Number 25 in script occurs

  • August 12, 2009
  • 1 Comment

When you modify the info.reportsendmail() in Ax2009 so it won’t send mails trough SysINetMail, but trough the SysMailer you could get the following error: ‘Internal Error Number 25 in script’. The same error occures when you try to post an invoice to a e-mail message. There is a hotfix for Microsoft Dynamics Ax 2009 SP1 (KB973902) […]

Add leading zeros

  • July 31, 2009
  • 1 Comment

You want to show a integer with a fixed length (for example 2characters: 1 –> 01). You don’t have to write your own for-loop to ad the zero’s in front or something like that. The function strRFix does this for you automaticly. 1 info(strRFix(int2str(1), 2, ‘0’));info(strRFix(int2str(1), 2, ‘0’)); Note: there is also a strLFix…

About labels

  • July 31, 2009
  • 0 Comments

In Ax there is a class called SysLabel. When you want to expiriment with labels, this is the place to be. Some examples: You want to find a label in a specific language. There are a few ways to do this, for you to chos witch fits best. 1 2 3 4 5 // Method […]

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 […]

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 […]

Changing AOT properties from code

  • June 23, 2009
  • 0 Comments

When you want to it is possible to change AOT properties from code. The first you need to do, is finding the treenode you want to modify: 1 2 3 4 5 #AOT #Properties TreeNode node = TreeNode::findNode(#TablesPath); ; node = node.AOTfindChild("SysUserInfo");#AOT #Properties TreeNode node = TreeNode::findNode(#TablesPath); ; node = node.AOTfindChild("SysUserInfo"); When you want to […]

Crap

  • June 16, 2009
  • 1 Comment

Did you ever find any ‘personal’ comments from a Microsoft developer in AX code? I did. In AX2009 SP1 I found the following code block in the method displayComments() on the form HRMGoal: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 […]

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 […]

Use of DateTime in select statement

  • April 26, 2009
  • 0 Comments

Created/ModifiedDateTime is a datetime field and the value will be stored as UTCDateTime. So when you want to find all the records created/modified on a certain date, you have to find all the records between the start of the day and the end of the day. The newDateTime() function is defined in the DateTimeUtil class […]

Ubuntu 9.04 – part2

  • April 26, 2009
  • 0 Comments

I noticed that the problems I experienced only appeared in the WUBI (Windows-based Ubuntu Installer). Because the WUBI didn’t work, I started upgrading my Acer Aspire 1700 ‘laptop’ and it went flawless 🙂 I noticed that my computer is booting a lot faster and I like the new notifications already. The first time I connected […]