Thursday 23 August 2007

V4 Service pack 2

Just installed this on one of my installations and found much to my consternation that MS has continued to rename tables.

Even in Service Packs !

The Country as it was in V4 and SP1 is now AddressCountryRegion which is consistent with the rest however .....

Anyhow enough said I have not found any others, so far.

/Sven

Correction:
Palle commented that as far as he knew the Country had been renamed in V4, and he is right, what happened is that the upgrade process from V3 allowed the object to retain it's old name all the way through to SP2 but no further.

So what I thought was an SP2 issue was in fact an issue related to the upgrade process.

Sunday 12 August 2007

Support Policy bugbear

Was just going through Customersource recently and found an article deatiling the new MS support policy for Ax V3 etc. I found it rather disconcerting, it seems the time frame given to support is now around 17-19 months, from official release of the previous SP.





Version Release date Support ends
Microsoft Dynamics AX 3.0 SP4 May 17th, 2005 April 10th, 2007
Microsoft Dynamics AX 3.0 SP5 February 28th, 2006 July 8th, 2008
Microsoft Dynamics AX 3.0 SP6 May 1st, 2007 January 13th, 2009





Rule is :


(Subsequent SP Release Date + 1 Year + 2nd Tuesday at start of next new quarter)





The issue is the time it takes for the customers to actually upgrade their versions is much longer than the interval between SP's and the issues caused by implementing the SP's sometimes outweigh the advantages gained. Especially as the SP's do not only contain corrections but also slip stream functionality releases, of course this is not the intention however MS should recognize reality in this regard.



The rule previously was that MS supported the versions 5 years from release date of the last SP. The latest policy change is obviously intended to incite customers to expedite their updates from V2.5, 3.0 to V4.



Unfortunately from my experience this process is far from being a shoo-in or in other words simple task, and will require the expenditure of a significant amount of time to effect for each of the companies that envisage this upgrade.



As the V4 upgrade did not contain a large number of functional changes, many customers will probably choose to wait for V4.1 or 4.5 now renamed V5.0 to do their upgrades as this is supposed to be the one containing a large number of functionality extensions.



In other words

V4 = Technical oriented upgrade ( new enforced AOS, AOT additions )

V5 = Functional oriented upgrade ( no new tech but lots of functionality (promised) )



V5 I have just been told may be delayed to sometime end 2008, probably even 2009.



Now many customers will be in a bind, pay the consultancy costs of doing an upgrade from V3 to V4 with no business justification based on features or wait for V5, but as a consequence live for som time outside of the support conditions recently imposed by Microsoft.



I believe it would be beneficial for MS to provide support for a longer period of time of the previous versions and service packs what do you think :-)

/Sven

Friday 20 July 2007

Refreshing Screen Info in V4 PII

After a lot of further studying it seems that it is not Lock / unlock that have been disabled but the flag that deems whether the screen needs redrawing that does not get set by the fact of updating the labels of the columns in a grid so my problem may not be V3 to V4 related it may be general.

Great, well I have a call in and I am trying all sorts of detours in order to get the form to update the column headers, so far the only reliable one is for the User (!) to click on the scroll bar below the grid.

A single click is enough to redraw :-(.

I have not tried to move the screen back into V3 in order to see how V3 will cope with it, it seems a rather retrograde step to undertake especially as it is meant for a V4 implementation.

Anyhow will post on this subject again later.

Take Care
Sven

Thursday 19 July 2007

Performance issues resolution in Ax Part I

This is a subject on which a lot has been written by any number of people so I will concentrate on some small parts of the issues relating to this, and this is not meant as anything else but a starting point.

Mostly when you have problems in Ax, as in most other ERP systems :-), it is related to some sort of contention that is concurrent access to key central information, or alternatively to large quantities of data being used/created.

In most of the instances I have seen the quickest fix on SQL is always just adding more memory, not that I am a big advocate of throwing money at the problem but well that is normally the cheapest solution these days.

In SQL 2000 and 2005, the main issue is centered around one fact, lock escalation, basically your server can if it deems to be running out of memory decide to start locking not each row but a page (unit of storage used to contain multiple rows in the database) and even the whole table. When this happens you tend to get a situation where everyone is waiting for each other.

Picture Picadilly circus bus stop on a busy afternoon where you have lots of busses all coming in to pick up / drop off passengers and having to wait for each other and thereby causing havoc for other traffic, that is the best physical representation.

In Ax say the CustTrans table is concerned or InventTrans then as one process is using it another 5 different ones want to use it too, they cannot as the first is blocking and they use other tables which they then block for others thus making a traffic jam in the database.

SQL decides to do this lock escalation when it has used more than a certain percentage of the available memory that it has to manage locks, thus if you give it more memory to play with it is less likely to do lock escalation and therefore to create the traffic jam.

In SQL 2005 some new functionality has been added concerning Index Lock escalation, however this is hard to add in Ax as information on the indexes, as these are created by the syncronization engine. You would have to add the information by hand on each index :-( after creation and then redo this everytime Ax runs a syncronization.

Additionally as you can see in this KB where means of reducing the lock escalation are discussed it is possible to switch of using the startup flag -T1211 however the resulting error condition of it running out of memory is not pretty.

One option that seems intriguing is the option of making an incompatible higher level block

BEGIN TRAN
SELECT * FROM mytable (UPDLOCK, HOLDLOCK) WHERE 1=0
WAIT FOR DELAY '1:00:00'
COMMIT TRAN

in Ax the tables classically affected are a series of well known ones, the problem with the above in Ax (as well as most other ERP's) is that one hides others etc. If f.ex. you resolve your issues on CustTrans then perhaps CustTransOpen or CustSettlement becomes the problem etc etc so this is often not a solution that we can use to resolve our escalation issues, also unless we do the locking for the whole business day we do not handle all the cases :-(.

Changing our queries is the next possibility mentioned to create smaller transactions.

Well, that is something that is possible in a limited fashion, you will have to clarify functionally with the business whether they can accept the consequences, f.ex. not make sales orders with moe than xx lines in them. Not do recap invoicing, etc etc.

What you can do is use the system to help you detect where you have problems and also use the system to dissect exactly the problem is being originated from.

A number of tools are availeable to you, the main one which I recommend all Ax sysadmins to get familiar with is the SQL tab under the User Options of each User.

This provides an invaluable help in order to get information about what parts of your system are not performing as expected.

What I suggest all sysadmins to do is to as a minimum activate the SQL tracing set a threshold of perhaps 2000 (2 secs it is in milliseconds) and to store long queries and deadlocks in the Table (database).

This will store in the database (accessible under Administration/Inquiries/Database/SQL Trace log the detail of every time a query took more than 2 seconds to execute, including the complete call stack of the process when this happened. You can even jump directly to the offending code and view / edit it.

With a little reflection it is always possible to optimise such queries and to thus reduce your performance issues, it is just a question of thinking about it clearly.

In V4 a few impediments have been placed on your way to having this level of information you have to enable Client Tracing on the AOS instance otherwise the table will be empty as the process will not be called.

Also in V3 KR1+ you have an extended toolkit that you can install, after installing the KR which you should have acces to through customersource or partnersource this allows you to control in detail what is being tracked and also allows you to log blocking behaviour, any process waiting more than 3 seconds on another will automatically log the fact that it is being blocked and thus you can see the effect that the "picadilly peak hour jam" has had on your system.

The good thing about logs is you can be factual about the increase / resolutions that you apply to your system.

Unfortunately MS have not seen fit to extend the above tracing extension into V4 probably because it was a separate development path. I have I think now managed to migrate most of it onto a V4 SP1 based system, the only issue I have is with the blocking monitor, I need to work a little on the SQL side to find out what I need to do exactly in order for it to operate.

Once it is complete I will post it here for you.

Take Care
Sven

Monday 16 July 2007

New Head of MBS Good or Bad ?

It seems MS keeps on killing off the MBS leaders, well not really killing off but they all seem to move on at a pace which is not conducive to trust in a business area where turnover is frowned upon.

Now we have Kiril Tatartinov as the new head of MBS.

He is to replace Satya Nadella who left in March 07.

Tami Reller was interim Manager, and is also leaving the MBS sphere, to take on new roles elswhere in MS.

Doug Burgum who was the manager for a long time left as recently as last year.

All in all a rather turbulent leadership of a division that now accounts for more than 1 Billion of Bill's yearly revenue.

Personally I have no truck with any of the above characters, the only issue I have is that it seems that MS has not really understood that they need to lead this thing, and that changing managers every 3-6 months is not a positive message to send.

I had hoped that Satya taking over was a sign of them wanting to go for the Dev environment type of tool, seeing as his background was solidly anchored in the Development tools team at MS.

However he / it was not given a chance to mature, and he was moved probably because the business did not show sufficient momentum or because he did not feel it was important enough for him.

I do not see Kiril as a strategic choice, I could be very wrong of course what do you think ?

I see him more as yet another stop gap solution for the role.

Why was Tami not given longer to try to perform ?

So is this the begining of the end ? Are MS looking to sell off the division ?

Some were already speculating when Satya was moved, have a look here at Josephs blog. (comments)

There are over 3000 people in the MBS division however, and some are well integrated into MS and cross pollination of job roles is something MS excels in (The average time in job is around 18 months :-) ). I think it very unlikely that they would sell.

Take Care
Sven

Sunday 15 July 2007

Dynamics Ax 4 SP2

At my last MS presentation there was a big part of the session devoted to the coming of this SP in June this year, and one thing they mentioned which I am very much looking forward to is that it should include some AIF methods allowing for updates of data.

Today the AIF is purely an Insert or Send style interfacing tool.

Of course this is not my only gripe nor others for more go to Dave's blog on the subject he is asking for anyone having live implementations to go and tell him what they have live.

Unfortunately I have so far only got a Proof Of Concept up and running so I do not have any live flows yet. However we will have when we can trust and ruggedize the application probably somewhere around 20 Companies doing SO-PO type flows with automated corrections at several levels.

The proof of concept shows it is possible but with a lot of code changes to ensure that the AIF is operational at all times.

We had issues with the COM connector (.NET) we had issues with the non existent update methods etc etc.

Anyhow more on this later but please follow up on Dave's blog and make him feel less alone on the forefront of this issue.

Take Care
Sven

Tuesday 10 July 2007

Refreshing screen info in V4

I have come accross a small change in behaviour from V3 to V4 which could potentially be rather adverse in its effects.

In V3 if you want to update a screen f.ex. and refresh it in a uniform manner then you called

element.lock()
/*
did all your manipulation of screen elements
called redraw or refresh (if you needed to re-read the data)
*/
and
called element.unlock()

The functions are still there but they currently seem to do nothing, I suspect it is related to MS teams taking over some of the screen painting functionality and they are probably using some other MSFT code package to update screen information. But this leaves me pretty much in limbo as I have to get the user to activate the scroll bar to change the screen elements as redraw seems to have been de-activated as well.

Anyone else noticed the above and more to the point has anyone found a workaround to this annoying little bug ?

I will share here if I find one, my google help engine has not worked :-), I have not seen it commented publicly anywhere yet. And on the MS help the only discussion thread I could find was from 2004 and a bit off topic.

Take Care
Sven

Friday 22 June 2007

V3 - V4 Interesting bug

I had an interesting experience the other day, actually I was pretty infuriated initially but now that I have done it I can laugh about it.

I had to create for a fashion related business a "vertical" order entry screen as opposed to horizontal one as found in Ax.

The project calls for the creation of up to 50 columns of size/Color/style related columns against which it is possible to enter the qty one wants to order.

In order to carry out the modification I used array based fields (not sure it was the best decision but it allows me to extend the screens etc quite easily) and I dragged the array of fields into a grid then proceeded to declare the fields as being visible to ther elements.

Then I tried to call them but stubornly the pre-compiler treated the call as an error and would not allow me to look up the fields.

Strange ? They were declared I tried debugging my form and in the debugger I had all the functions properly declared as they should be.

Thinking it was a problem with the length of the names I renamed a field, then the system said illeagal name ? Interesting, apparently when you drag the fields on to the grid they are autonamed with a [xx] extension name based on the array element they represent however [ ] are not leagal names for fields :-).

So I had to go through and rename all my fields if I wanted access to them in the grid. Wonderfull stuff ! Not !

Anyhow have reported it to one of our partners and hopefully he will get them to change it at some time in the future.

Take Care and Have Fun
Sven

Tuesday 8 May 2007

Dynamics AX Base Data Model Part II

I ended the previous message on this subject by discussing the inventdim and stating that the introduction of this element had caused quite a lot of heartache in many installations.

In the previous product (XAL) the fields constituting the stock keeping unit as well as the stocking dimensions were found in all the relevant tables, from the sales order lines through the invoice lines down to the inventory transactions themselves.

When Benny was designing the database for the new model some smart Db developer suggested normalising this structure by creating a reference to a new table that contained the information.

This would significantly reduce the amount of data stored in the database, as now the transaction files would only contain a reference id (inventdimid) rather than all the fields (ConfigurationId, SizeID, ColourId, etc). Another thing that this simplified was the ability to add more dimensions to the table seemingly effortlessly, or at least with minimal effort.

So now inventdimid was added to

InventSum (Summary Table containing sum of inventTrans for that dimension combination or inventdimId)

InventSumLogTTS (Used by MRP when doing reduced calculations and also by IMTS)

SalesLine (Sales order lines default values for InventDimId)

PurchLine (Purchase order lines default values for InventDimId)

CustConfirmTrans

CustPickingListTrans

CustPackingSlipTrans

CustInvoiceTrans (Sales order flow lines note could be different InventDimId’s attached to lines in inventTrans that are attached to each document line)

VendPurchOrderTrans

VendReceiptListTrans

VendPackingSlipTrans

VendInvoiceTrans (Similar to above flow except this time purchase related, again same comment applies that the InventdimID of the line could be different on the linked InventTrans)

InventTrans

Are some of the main tables containing our new InventDimId field, I have not mentioned the MRP, Warehouse management, project, requirement planning tables that also include it but you can easily add those your self if you wish.

Note some notable additions in V4

InventSumDelta
InventSumDeltaDim

And

InventSumDateTable
InventSumDateTrans

Because of the nature of inventory valuation reports and their dependence upon the data contained in the above and 2 further tables that are intrinsically linked to the valuation of stock

InventSettlement (Contains all the inventory re-evaluations that have been carried out against any given transaction)

InventTransPosting (Contains the accounts on which valuation and re-valuation has posted values pertaining to a given inventory transaction)

It is given the data structure necessary to create a report using InventTrans joined to Inventdim through the InventDimId joined to InventSettlements in best case and in worst case with a search on the settlements in order to populate a report with correct values.
And if the report is as of a date it is even worse as it has to then first look at inventsum, deduct the inventtrans and or invensettlements that it has done after the date, trusting the user to have carried them out correctly and then present the resulting information as it’s version of the truth.

The Select statement looks like some version of the below taken directly from some of the classes doing this:
select forceplaceholders sum(CostAmountPhysical) from inventTrans
where inventTrans.StatusReceipt == StatusReceipt::None &&
inventTrans.StatusIssue == StatusIssue::Deducted &&
inventTrans.ItemId == itemId
exists join inventTransPosting
where inventTrans.VoucherPhysical == inventTransPosting.Voucher &&
inventTrans.DatePhysical == inventTransPosting.TransDate &&
inventTrans.InventTransId == inventTransPosting.InventTransId &&
inventTransPosting.InventTransPostingType == InventTransPostingType::Physical &&
inventTransPosting.IsPosted == NoYes::Yes
#inventDimExistsJoin(inventTrans.InventDimId,inventDim,inventDimCriteria,inventDimParm);

postedPhysicalValue += inventTrans.CostAmountPhysical;

select forceplaceholders sum(CostAmountAdjustment) from inventSettlement
index hint ItemDateIdx
where inventSettlement.ItemId == itemId &&
inventSettlement.Cancelled == NoYes::No &&
inventSettlement.Posted == NoYes::Yes &&
inventSettlement.TransDate > perDate &&
inventSettlement.SettleModel == InventSettleModel::PhysicalValue
exists join inventTrans
index hint RecId
where inventTrans.RecId == inventSettlement.TransRecId &&
inventTrans.StatusIssue == StatusIssue::Deducted
#inventDimExistsJoin(inventTrans.InventDimId,inventDim2,inventDimCriteria,inventDimParm)
exists join inventTransPostingPhysical
index hint DateVoucherTransIdx
where inventTrans.VoucherPhysical == inventTransPostingPhysical.Voucher &&
inventTrans.DatePhysical == inventTransPostingPhysical.TransDate &&
inventTrans.InventTransId == inventTransPostingPhysical.InventTransId &&
inventTransPostingPhysical.InventTransPostingType == InventTransPostingType::Physical &&
inventTransPostingPhysical.IsPosted == NoYes::Yes;

postedPhysicalValue -= inventSettlement.CostAmountAdjustment;

Regardless of how much you may update / optimise your SQL server given that there are a large number of rows in InventTrans, double that in InventTransPosting and at least double that in InventSettlements (if using average costing) the above query is deadly for the database in terms of performance.

In order to counter this Benny has developed his fast reporting tool which you will find advertised on his web site, and MS have added the InventSumDateTable and the InventSumDateTrans tables which basically do the above queries but store the results in a table which is then consultable.

Unfortunately again the table does not contain a simple date rather they have chosen to have just a parmId reference stipulating the reference number of the calculation having been carried out, and then to use adjustments based on this so again if you want the values as of a date you are stuck doing a subsequent query to get back to a situation back in time.

Enough about InventDim & InventDimId.

InventSum as stated earlier contains a summary of the linked InventTransactions based on the InventdimID associated broken down by the StatusIssue and StatusReceipt fields the transaction is summarized in this table.

This action is carried out based on any change to the inventTrans table, that is the simple fact of doing an update or insert on a record in that table will automatically be reflected in the InventSum table, if it is an update 2 inventsum records could be affected (if the inventdimid changes).

The InventTransPosting table contains the Ledger accounts that have been impacted (posted on) during the update of either a physical transaction or a financial transaction. The reason for having this table is to allow subsequent revaluations of the inventory transactions to be posted in the GL using the same account numbers as the original transaction.

Example:
We introduce a new item in the catalogue, and purchase 100 pieces with an assumed price of 1 units / piece, we receive the items in stock and start selling the items.

When we have sold half the lot of 100 we receive the purchase invoice which is for 90 cents / piece only as we have already had COGS (Cost of Goods Sold) recognized as 50 * 1 unit or 50 Units on the total of 90 (90 cents * 100) there are only 40 units left to share on the remaining 50 units this makes the COGS / piece = 40/50 or 80 cents on the remaining 50 units.

To correct the above Ax has an inventory costing mechanism that allows the system to recalculate a more accurate valuation and correct the COGS of the already sold transactions.

The InventSettlement table will contain the corrections to the existing transactions which would deduct 10 cents / piece for the old invoices and add 10 cents to any new ones.In order to ensure the right accounts and financial dimensions are impacted the account numbers as well as the financial dimensions are stored in the InventTransPosting table.

Sound complicated well not really compared to others it is quite simple but meethinks I will continue later.

/Sven

Monday 16 April 2007

Upgrading from V3 to V4 Part IV

I have one final gripe as regards this process, label files. Someone in their infinite wisdom decided to cancel the GLS and DIS label files and to integrate these in the SYS label file.

Aside from the gargantuan task involved, I am sure somewhere along the lines some countries lost some labels, the above is a pain in the neck for anyone having used in their code references to "System" labels that ostensibly would never disappear.

Now the best means of finding these instances is to export all modifications by creating a project containing all elements changed and searching the resulting text file for invalid label references.

Much to my consternation I have found that some of the SYS labels have also disappeared / been renamed, this is to me rather incomprehensible.

What motivation could there be for this ?

What does it mean if you have used any system labels in your code then you need to revisit every single one to ensure it's validity / proper understanding, that seems excessive.

Best Regards
Sven

Thursday 12 April 2007

New Fix distribution policy Horror from MS

Someone in their infinite wisdom in MS has decided that any fixes to the product Dynamics AX 4.00 SP1 onwards will be distributed in an aod file directly.

Why do I state that this is horrible ?

Well all fixes will be lumped into one DIS file and new versions will be sent out as new fixes are added, so now we have 4 SP and DIS version number questions that need to be answered by support.

When installing a new DIS to fix one small issue that perhaps necessitated a 2 line fix we are obliged in a user installation scenario to get everyone out recompile the whole application and also what is really the worst part of this decision, re-validate all process flows as we are implementing a patch not a fix, namely all of the code in the DIS file which might and will probably impact a number of other processes.

As those who have been around can testify one man's bug is another man's feature, I cannot cite any V4 examples yet as most of the bugs I have seen fixed are really bugs. However in V3 SP4 the code doing inventory reservations was "fixed" so that it always started reserving from the Warehouse / Pick Location rather than just Warehouse level as it did in earlier versions.

Of course if the Pick Location is present then it should try and reserve from there and not just pick any location in the warehouse, however I had several clients who had built code based on the premise that AX functioned as it did before the fix, subsequent to the SP implementation their code broke and reserved nothing threw spurious error messages etc etc.

What the above policy means is that all functionality that is important has to be tested every time a fix is implemented, in other words a fix has to be treated as if it was a SP.

This is not really a wise policy and I hope MS will reconsider and continue providing fixes as distinct XPO's with correct table, field, and object id's so that we can introduce these in the system with the least possible disruption.

Imagine:

The system is down because it calculates VAT incorrectly (see previous discussion) and we are waiting for a fix from MS, they find it and send us a 5 Mb aod file containing all the fixes. So now we have to do a weeks validation before being able to implement the fix to 2 scripts because all sorts of other scripts are "fixed" as well.

I can see that building all the fixes in one environment is easier for MS and allows the next SP to be constituted in an incremental fashion as it is the AOD file in question, however releasing this into nature just means we have lots of "SP's" being released all the time which is not very optimal for the reasons I state here.

Best Regards
Sven Jochimsen
.

Wednesday 14 March 2007

Upgrading from V3 to V4 P3

Well here we go I carry on my run through of some of the obstacles I have faced in upgrading from V3 to V4.

The CreateLine function on the SalesLine Table has an added parameter that controls credit checking behaviour, incosiderately MS have choosen to add the new parameter before the last parameter which is a string. This means that even though it is defaulted if you are using that last parameter your code fails because of type checking.

They should really think before acting !

Hopefully for the future they will not in version 4.1 4.5 5.0 repeat some of these rather cavalier changes all over the place.

What's with the changing of all the tab page elements in all forms to be named Tab, do they not realise what pain they cause for any changed forms, you cannot just migrate you practically have to hand code / port the changes.

And making what I would call gratuitous changes to the names of Tabs inside a form is just silly, why do you need to rename a Tab from NotificationToCentralBank to NotificationToTheCentralBank example taken from the CustTable form.
Anyhow making long names in Ax is sometimes counterproductive as only a certain number of characters are used to distinguish elements so it can actually be dangerous unless V4 is improved in this area.

But in any case such changes are silly and add nothing to the value of the product.

To be continued

/Sven

Tuesday 13 March 2007

Upgrading from V3 to V4 P2

As stated in the earlier posting here is the continuation of my meanderings through the process of upgrading Dynamics Ax V3 code to V4.

Several tables have been renamed completely unexpectedly.

I have not found them all mind you just the ones that were used by the code I had the pleasure to upgrade.

The SmmQuotation tables have been renamed SalesQuotationTable which is what everyone knows from the whats new.

What I had no inkling of is that SalesPickingListJournalTable had been renamed to InventPickingListJournalTable likewise the lines and the form that is attached to the lines etc etc. As I had code that was dependent upon this and the code was not being imported it did not switch over to the new naming convention so I had a field day finding everything ;-).

A lot of screens will keel over as MS has had a field day renaming functions all over the place, albeit to more logical names but they should know that doing this is not with out consequences
F'ex the Function EmptyAddressField in the AdressMap which clears the data in the adress fields of any entity with adress fields attached is now called clearAddressField, which is more logical than the old naming convention but it does force you to revisit any code you built around this.

The TmpSalesLine table used by the old Address screen has been renamed to the SalesCreateReleaseOrderLineTmp table however the TmpPurchLine retains its old name, go figure on that one ?

I will continue as I go adding more

Best Regards
Sven

Sunday 11 March 2007

Upgrading from V3 to V4 P1

I have recently been involved in some upgrade projects from V3 to V4 and frankly I am a bit put off by the degree of cavalier change that has been done in the App in V4.

As an example I intend to go through some of the changes and evaluate them as being either positive or negative and also to discuss a little how you can get around them.

As discussed earlier in V4 MS has reduced the usage of layers, put in another fashion they have actually cleaned out the GLS, LOS and DIS layers and put all the code contained here into SYS.

That in itself is not really too much of an issue however they have also in their infinite wisdom decided that they will at the same time renumber the objects that have been moved to give them a SYS id number.

If you do not know what the numbers are or how they relate to layers please read either http://dynamicsmatters.blogspot.com/2007/01/layers-news.html or other related resources to get more information.

Obviously the fact of renumbering creates all the issues that I pointed to in that previous short article, if you have code that you bring accross in layers (that is pre compiled) you may very easily be subjected to crashes and compile errors that are strange, such as duplicate fields with different ID's.

I have so far been able by deleting each of these fields (and re-booting as the AOS server crashes when you do so) individually to clean up the code as regards these fields, however there are a number of EDT's that had previously been named slightly erroneously or that could cause confusion that have been renamed.

An example is the Country EDT which is now called CountryRegionId, there are quite a number of these renames and if you combine the field duplication with a rename you wind up having a table with the country code and the countryregionid code perfectly legal with each their ID's but very confused data.

Anyhow I intend to do a series of articles about each of the issues I find and to propose a possible solution for each.

So for the fields you need to compile globally the database and then prepare to restart the AOS the number of times you have the issue of duplicate fields as the deletion of the field will cause an error message :-).

For the Country -> CountryRegionId you need to go through all of the (typically DB trigger code) code where this is used and change the field being referenced to the new field. As for any fields that you may have created in your own extensions of the system up to you: If you rename you are being consistent with the new naming scheme of MS however you will have to add a data manipulation step to the upgrade programs in order to move the data from the old column to the new one.

If you do not change the name then you do not have to move the data however you are not compliant with the new MS ax definitions.

To be continued in a very long series :-(

/Sven

Friday 26 January 2007

Writing sustainable Code in AX Part I

I have long wanted to post something on this subject as it is the most often repeated question from customers.

There are two main schools of thought :

1. Do as little development as possible, and stick to the standard functionality.

2. Start adapting Dynamics Ax as needed.

The first options seems to be the most intuitively correct option, there is only one issue with this option, that is that Ax in it's standard inception is not well suited to almost any business that is contemplating implementing Ax.

I have participated in a large number of implementations of Ax and have only ever seen one succesfully toe the line, and that is the reference customer that Damgaard used to use in Denmark that is situated in very close proximity to the development center. Where the management had decided to follow the line in order to be beta customer all along the line, and have done so AFAIK to this day.

Aside from this one customer I have not met any that have really toed the line in this respect though most actually profess wanting to do so, but as the product is designed to be built on rather than be followed it is hard to do so.

If you want to use an analogy that is easy to understand both Dynamics Nav and Dynamics Ax are a bit like another famous Danish product which some of us have played with in our infancy, Lego. Both systems have been built to be modified, they provide the basic building blocks and trace a map of what the business processes could be like, a set of building instructions if you like and thereafter you are given the opportunity to adapt this map to your business.

If you take most other systems they are more built along the lines of a prefabricated model train track set, you can choose at each intersection which way to send the train but you cannot change easily where the interchanges are nor what they govern. I will name no names ;-). And if you want to change your track layout you have to start major civil works in order to adapt the wanted layout to the landscape, and in most cases that has consequences further down the line.

In my view after having worked with both Dynamics Ax, Dynamics Nav, XAL, and other predecessors for over 20 years, it is best not to do either.

Option 1 of doing no dev negates the competitive advantage provided by the fact of choosing a flexible ERP system designed to be flexible, option 2 of doing all kinds of development as required usually winds up in excessive upgrade costs.

The art of being a good implementer of this product lies then in balancing the two options just right in order to acheive an implementation that is as I called it in the title sustainable.

I have been trying to establish a set of guidelines in this regard the problem is of course that as with any good compromise it should be flexible and adapted to the situation.

As an example, in general terms it is not good to change the central data model in the application as those kind of changes may necessitate extensive work in the future during upgrades. However take the case of a medicinal company that needs extensive tracking and needs to use its inventory in a very specific sequence and to transfer Use by date information throughout. In their case not making changes to the central data model is stupid as the changes necessary can be handled much more easily by doing so than by not doing so.

There are off course many such examples, anyhow I have to get back to my day job I will detail more in my next posting on the subject. And look forward to any comments.


/Sven

Sunday 21 January 2007

V4 Second look

Now that the real V4 has come out, in the form of SP1 or 4.01 depending upon when you asked the question :-), what is it like ?

What has changed compared to the buggy version brought out in June ?

Well certainly most of the bugs that I have discussed here seem to have been dealt with but some have not and some new ones have appeared, in my estimation SP1 was rushed out the door. The proof of the pudding is often in the tasting as they say concerning food :-) in this case SP1 was supposed to have been release in early november for a limited number of countries and in early december for the rest.

In actual fact the november version was brought out on the 5 of december after a gargantuan effort by everyone to get most things ready, and thereafter on the 22 of december we got the rest. Not a huge delay by any means in software terms especially considering all the teams that had to co-ordinate and deliver in order to meet the deadlines that were originally set.

However the problem was and is that a large number of issues still exist even after the cutoff and as work was being carried out untill the cutoff date it is fairly obvious that there are and will be a large number of issues in what has been released, not on the tools side but on the functional side where there has not been enough time consecrated to tesing the application.

Hopefully we will see an SP2 in the plans soon in order to correct this, or alternatively the 4.1 release being brought forward.

On the technical side we have probably one of the best AOS implementations ever, fortunately as we now no longer have the option of not using the AOS. I have had the opportunity of testing with a farm of AOS servers and a large number of clients and in many instances even shutting down several AOS's many of the client sessions survived. Which given the parallel execution streams that are ongoing is pretty damn impressive, just as a reminder in version 3 and before if an AOS was taken off line all it's sessions died automatically.

On the dev side I have not really used the CLR functionality extensively yet but it looks good.

I will have to continue later, interrupted by an issue with KR2.

/Sven

Saturday 20 January 2007

Layers News

Well MS have recently announced that they are doing the country localisations in the GLS layer, so where does that leave things ?

I am sure that unless someone is very very carefull we will see some strange issues regarding field numbers, for those who know skip my explanation.

In Dynamics Ax all objects (Tables, Fields, Classes, Methods, Reports etc) aside from their names receive a number which is used to reference them in the code, the P Code or run time code that the Ax compiler creates uses the numbers to reference items not the name as this would take up to much space and would also significantly slow down execution.

The numbers in question are alloted based on the layer in which the elements are created, that is 0 upwards is SYS etc, what will now happen with elements that have been migrated from the old setup where the SYS code was in SYS, GLS, LOS and DIS to no being only in SYS and GLS. One can only hope that they have kept the numbers from Verson 3 when building but also we could have phantom numbers apppearing because of certain localisations having been present when add-ons or code was made and now thos numbers could be re-used by other code.

Fortunately the compiler is pretty good at at least enforcing type casting, but well this could be an interesting issue to follow in the future.

/Sven