Dynamics AX Blog - Dynamics AX 2009 - Posts from 2012

These posts are machine-translated.
Currently, only posts are displayed, which are relevant for Dynamics AX version »Dynamics AX 2009« Filter entfernen

RSS-Feed of this version
Currently, only posts from »2012« are displayed

hasField()-Method

I had already seen the situation that I wanted to know if a record has a particular field to be able to process the containing value. For example, within a method, which processes the calling args().

For example, in class SysDictTable the hasMethod() method is available, but i have not found a hasField() method so far.

Therefore I've created the following logic:

Common callingRecord;
itemId itemId;
SysDictField itemDictField;

itemDictField = SysDictField::findFieldByName(tableId2name(callingRecord.TableId), identifierStr(itemId));

if(itemDictField)
{
    itemId = callingRecord.(itemDictField.id());
}

 


 
 
 

Validate voucher for duplicates in Dynamics AX 2009

Following code could be useful, if you have to check for duplicates voucher numbers:

ledgerParameters::checkDuplicate(_voucher, _date);

 
 
 

 

 
 
 
Posts of the actual month
April 2012
MoTuWeThFrSaSu
 1
2345678
9101112131415
16171819202122
23242526272829
30 
 
© 2006-2025 Heinz Schweda | Imprint | Contact | German version | Mobile version
In order to provide you with better service, this site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies.