Topic: ‘System – AX’

 
 

Possible Bug in AX 2009 WorldShip Integration

By in Development, Dynamics AX, System - AX, Trade and Logistics on Tuesday, June 29th, 2010

We have, at a client, integrated WorldShip with AX via the export map in WorldShip writing to the ShipCarrierStaging interface table.  The ShipCarrierStaging table is an existing table in AX – its part of the standard shipping integration with AX2009 – and is designed to accept any incoming freight record from a shipping package (like WorldShip).  When you invoice a packing slip, it pulls the tracking number and freight charges from this table.  So, this table is never populated with MorphX commands – it is always being populated via a SQL insert or via an ODBC update. 

The insert trigger that intercepts the record does certain things to the inserted record, then writes it to the table.  One of the things it does, at the top of the trigger, is "set @recid = select max(recid) from ShipCarrierStaging" to set a unique value for the RECID field in the table.

All of the above is standard AX.

Here’s the problem.  Between when the "select max(recid)…" command issues and when it actually inserts the record can be anywhere from immediately to a second or two depending on the size of the table, the state of the server, etc.  When you have multiple WorldShip stations inserting records simultaneously, it is possible for Station 1 to deliver a record to the table, then have Station2 deliver a record, then the trigger writes Station1′s record, and then the trigger writes Station2′s record.  However, since the read for Station2 on the select max() happened before the Station1 write, both records get exactly the same RECID.  Therefore, the Station2 record fails on a primary key violation, since the RECID is the primary key.  I can easily replicate this as follows:

1. Write a simple insert statement to the table enclosed in a do while loop with a counter set to 10,000

declare @counter as int

set @counter = 1

While @counter <10000

begin

insert into Shipcarrierstaging (column name list) values (value list)

set @counter = @counter +1

end

You’ll have to edit the column name list to match the table (without the RECID field included) and the value list must be provided.

2.  Copy the insert statement to another query window

3.  Start the first query, go to the next window, start that one.

4.  See the error in the second window.

I can solve this in SQL by changing the RECID to an identity column and letting it increment, then modifying the trigger to avoid the RECID field entirely. I haven’t yet talked to the dev team on how to modify the trigger via AX’s development environment (if we don’t, any sync to the database will overwrite the trigger modifications).

This error is a critical issue if you have more than one shipping machine.  Its been reported to MS via the OTC and they have submitted it to queue, but no resolution has been promised.

Cheers,

Dwight

 

Updating Multiple Records in Dynamics AX 2009 Using the Fill Utility

By in AX Training, Development, Dynamics AX, System - AX on Wednesday, January 6th, 2010

There are many data maintenance tasks that are simply too big for manual updating, but too small to justify writing scripts and using IT resources.  Dynamics AX 2009 features a Fill Utility that allow you to update multiple records at the same time.  For example, if you decide to change the Cash Discount for all customers or a group of customers, you can use fill utility to update all the selected customers at the same time.

  1. Open the form where the field that you want to update is displayed.
  2. Right-click the field that you want to update and select Record info from the menu.
  3. Click the “Fill Utility” button.
  4. Use the Inquiry to select which records should be updated.  For example, if you only wanted to update the Cash Discount for customers in a certain State, then you would select ‘Sales District’ in the ‘Field’ field that is related to the Customers Table.  This will return only customers that match that criteria.
  5. Once the Fill Utility form is open, you can see the records you are about to change/update.  Remember, in this form you can remove any records you do not wish to update.
  6. Click OK, and the New Field Value window opens.  From here you enter the desired field and click OK again.  This will update your records!

fu1

Of note; not all fields are available in AX for Fill Utility.  Also, not all users have access to Fill Utility.  This feature is only available if the Fill utility configuration key is selected and the Fill utility security key is enabled.

To view changes that were made using the Fill Utility, see Basic/Inquires/Fill Utility Log

 

‘Inside MS Dynamics AX2009′ App Available for iPhone

By in AX News, AX Training, Development, Dynamics AX, System - AX on Tuesday, January 5th, 2010

apppicMicrosoft Press has released Inside Microsoft Dynamics AX 2009 as a book application for the iPhone.  This book is a must have for many AX professionals.  The app features the full version of the book, full text search, dictionary, and the ability to add notes.  And at $5.99, it’s a great value over the $40-$70 for the tree-and-pulp version.  It’s available here.  (iTunes required).

If anyone knows of pdf version of this book (or any other AX book), please let us know.

 

CommaIO for Flat File Integrations

By in Development, Dynamics AX, System - AX, Uncategorized on Tuesday, May 12th, 2009

I was reminded this week that while the Application Integration Framework is a fantastic tool, many systems that people integrate with do not have XML capability out of the box.  Most systems however, will have the ability to export a flat file (.csv, etc).  While I prefer the ease of use of the exchange of AIF, sometimes it is not cost effective to implement.  The flat files can instead be easily integrated with Dynamics AX by creating a class that extends RunBaseBatch to get a file name from a user, then use the CommaIO class to process that file.  The method below is an example of a method that could be run after getting the Filename back to the class:

code-screenshot

 

Quick and Easy Functionality Guide for Dynamics AX 2009

By in Dynamics AX, System - AX on Thursday, May 7th, 2009

After a 2009 upgrade, we have seen the need for Dynamics AX 4.0 power users to have a quick and easy guide to see (and hopefully use) the new functionalties found in Dynamics AX 2009.  To help understand the differences between Microsoft Dynamics AX 4.0 and AX 2009, some of the major upgrades, improvements, or new functionality have been documented in a brief, descriptive outline with graphical indicators.  I refer to this often when I need to review / compare Dynamics AX 4.0 to AX 2009.

ax-2009-functionality-overview

 
Page 2 of 212