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

2 comments:

Anonymous said...

Thank you! I very much appreciated this post. Please go on.

Regards,
Evgeny

Sven Jochimsen said...

Thank you for the encouragement I will try to do so ;-).

Take care
Sven