Topic: ‘Development’

 
 

How to Use Base Calendars More Effectively

Posted November 29th, 2011 / No Comments

When creating calendars to use in Dynamics AX, most users don’t want to spend a lot of time manipulating working days on each calendar especially when dealing with holidays and planned shut downs that affect the entire operation.

Read the rest of this entry »

Continue Reading

 

Quickly and Easily Creating New Factboxes in AX 2012

Posted November 22nd, 2011 / No Comments

In AX 2012, most forms have at least one “factbox” on the right side of the form.  They will most often contain information pertaining to the highlighted record.  But often times, we would like to see other or more information in one of these boxes.  I’m going to use an example to explain a fairly straight forward way to create a new factbox (or “part”) that doesn’t require too much technical knowledge. Read the rest of this entry »

Continue Reading

 

Sort Vendor Check by Vendor Name

Posted September 2nd, 2011 / No Comments

Some users of the AP module in Dynamics AX may request that when checks are generated from a payment journal be sorted by vendor name.  Currently the way the query is designed, the sorting can not be done because the name of the vendor/payee is not in the transaction journal.  To accomplish this task, there are three changes that need to be made. Read the rest of this entry »

Continue Reading

 

Number Sequences Going Global in AX 2012-An Introduction

Posted August 5th, 2011 / No Comments

Number sequences in Dynamics AX probably only get technical types and a few bean counters excited.  But one man’s trash is another’s art.  In AX number sequences as in most ERP systems provide unique identifiers to transactions (SO, PO, JE, etc.) or master data (e.g. customers, items, vendors, etc.) In AX these user friendly identifiers can be maintained in continuous or non-continuous alphanumeric sequences. Read the rest of this entry »

Continue Reading

 

SET NOCOUNT when executing SQL from X++

Posted April 14th, 2011 / No Comments

You have created a stored procedure, tested it, and figured out how to call it from X++. However, when you execute your code the procedure doesn’t work as expected. Your calculations are inconsistent.

Execution feedback is one reason that will cause inconsistent, wrong calculations when your stored procedures are called from X++. Feedback messages interrupt your X++ execution of your SQL stored procedure. For example, if you have a have a While Loop that updates five data rows only three might be updated because the execution was interrupted, by the feedback, before your Loop got to row four.

Read the rest of this entry »

Continue Reading

 

Possible Bug in AX 2009 WorldShip Integration

Posted June 29th, 2010 / 3 Comments

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

Continue Reading

 

Find the First Empty Location in a Warehouse in Dynamics AX 2009

Posted March 31st, 2010 / No Comments

joe3

Continue Reading

 

Using #InventdimJoin Macro in AX 2009 to Extract Records

Posted March 20th, 2010 / No Comments

The code snippet below demonstrates how to use the #InventdimJoin macro within AX 2009 to extract records from a table that have an InventDimId in them, and join to the proper InventDim record by InventDimId without having to write the entire SQL statement to create the join and ensure that the join is coded properly.  The #InventDimJoin macro will insert the necessary lines needed during execution to ensure that the join is done properly.

joe2

Continue Reading

 

Updating Multiple Records in Dynamics AX 2009 Using the Fill Utility

Posted January 6th, 2010 / 1 Comment

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

Continue Reading

 

‘Inside MS Dynamics AX2009′ App Available for iPhone

Posted January 5th, 2010 / No Comments

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.

Continue Reading

 
Page 1 of 212