Posts

Showing posts from September, 2010

Iterate over multiselected posts

Usefull code that gets the selected posts. void iterateSelectedRecords() { CustTable custLocal; ; //getFirst method gets all the selected records in the grid custLocal = CustTable_ds.getFirst(true); while (custLocal) { // Do something with the posts // get the next selected record custLocal = CustTable_ds.getNext(); } } Another usefull function is *****_ds.mark(), which returns the number of selected posts.

Missing CustCollectionLetterNote transactions after upgrade AX 3 to AX 2009

The table CustCollectionLetterTrans in Axapta 3 was extended with a field called AccountNum in Dynamics AX 4.0. This new field is used as a relation between CustCollectionLetterJour and CustCollectionLetterTrans. If you upgrade from AX3 to Dynamics AX 2009 the upgrade scripts will not update the transactionsrows which will result in all collection letters missing their transactions. To fix the problem loop over the CustCollectionLetterJour posts and update their corresponding transactions. update trans set trans.AccountNum = jour.AccountNum from CustCollectionLetterTrans trans join CustCollectionLetterJour jour on trans.collectionletternum = jour.collectionletternum and trans.dataareaid = jour.dataareaid

Bug in the Dynamics AX 2009 installation on Windows Server 2008

During the installation of Dynamics AX 2009 server on a Windows server 2008 the installtion creates a inbound rule in the windows firewall. The bug will create a none valid path to the server binary. This will make the AOS service unavalible when trying to access from an other computer with a axc file. To fix the problem find the Dynamics Server in the inbound firewall rules, open the properties, select the "Programs and Services" tab and take a look at the path to "This program". The path will be missing the ".exe" in the end. Either use the browser to locate the server binary again or add ".exe" in the end of the path.

Post and Pre sync, missing number sequence

Before starting the upgrading process make sure that used number sequences are correct setup in the ax3 environment, otherwise you can get errors during the database post/pre sync. if you forget doing this you will need to comment the code that uses the none setup number sequence and run the upgrade script once the whole setup is complete.