Dynamics AX Blog - Dynamics AX 2009 - Page 4

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

How to use labels contaning line breaks in infolog

Some labels containe line breaks ( ). If you want to use such label in infolog, you should use the function strFmtLB:

// Wrong
info(strFmt("@SYS322576", "AccountsPayableServices", "Allgemeiner Fehler"));

// Correct
info(strFmtLB(strFmt("@SYS322576", "AccountsPayableServices", "Allgemeiner Fehler")));

 
 

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);

 
 

Whitepaper for global address book

The global address book is probably one of the great new features in Dynamics AX 2009.
And especially when upgrading from earlier versions questions may occur.
Some of these questions are answered in the Microsoft white paper on the global address book, but certainly not all;-)

However, every developer and consultant should lead this White Paper once to mind. Because the whitepaper contains, for example, a description how to import customers / vendors or business relations via Excel.

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=052e9dda-667b-42bd-bd13-f8c5aa1bc0f0


 
 

Tip: Convert job into class

Did you know that you can easily convert a job to a class simply by copying the job to classes-node in AOT using drag & drop?


 
 

Move pallet using X++

Using the following code, you will be able to move a pallet per code.

WMSPalletMove wmsPalletMove = new wmsPalletMove();
wmsPalletMove.parmWMSPalletId('00000022_117');
wmsPalletMove.parmToInventLocationId('300');
wmsPalletMove.parmToLocationId('01');
if(wmsPalletMove.validate())
{
   wmsPalletMove.run();
}

 


 
 

What is the difference between update and doUpdate?

What is the difference between update() and doUpdate()? You canfind the answer on MSDN or you take a look at the following table.

Method Note
insert vs. doInsert When raisng the doInsert the insert-method of the table will not be called
delete vs. doDelete When using the doDelete method the delete method of the table will not be called, but the delete-method of the xRecord will be called, therefore DeleteActions will work
update vs. doUpdate When raisng the doUpdate the update-method of the table will not be called

 


 
 
Pages « 1 2 3 4 5 » 

 

 
 
 
Posts of the actual month
April 2024
MoTuWeThFrSaSu
1234567
891011121314
15161718192021
22232425262728
2930 
 
© 2006-2024 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.