Skip to main content

Posts

Mental note to self - disabling upgrade check list

Today I experienced that the Administration menu in AX 3.0 was very limited. This was due to a previous upgrade of the Payroll module, resulting in the upgrade check list was to be run. However the upgrade had been done in a dev/test- environment and been moved to a test/live environment. Thus the need to complete the full upgrade check list was nonscence. However we couldn't deactivate the upgrade check list via the menu, because the administration menu was limited to showing the Periodic menu node only. However we could access the AOT :). Mental note to self: If you want to disable the upgrade check list but for some reasone you have no access to the Administration menu item Administration/Setup/System/Checklists/Prevent startup of list you can activate the Action menu item SysCheckList_InitNoUpdate. :) Restart the AX client, and the Administration menu should be complete :). That was what I experienced anyhow. 20\01\2010 - UPDATE Well one more thing to mention about this little

Batch-renaming a primary key.

For a programmer who has experienced the "terror" of having to batch-rename primary keys in Dynamics AX's predecessor XAL/C5, I was pleasantly surprised to find how easy it is in Dynamics AX 2009. Though not documented a method called renamePrimayKey exists on the kernel class xRecord which each table apparently inherits from. If you call this method after changing the primarykey field on a tablebuffer, this change will be cascaded to related tables. :0) I was given a task to perform renaming of Items in the InventTable. In an environment that is to go live - so THERE WERE NO TRANSACTIONS OG STOCK LEVELS . If this has been the case we would have adviced the customer to live with it, as the renaming process potentially would have taken a very long time Nearly 75% of the item numbers were named with 4 digits, the rest with 5. The customer wanted only 5-digit item numbers. How to do this in one go ? A simple job is enough: static void Job7(Args _args) { InventTable inven

DYNAMICS AX Import Export Tool - digging a bit deeper.

Normally when I've used the export/import-tool in AX, it's because you want to dump data from a small database and import it in another environment, or if you want to install some sort of demonstration database in an environment. Up until now, if I've been presented with a task of importing data into a customers environment, i've always programmed some sort of class that handles the import. A couple of weeks ago, a colleague of mine showed me that the import/export tool, can be used for the same task - that is importing data, from e.g. a .csv-file, that your customer prepared in Excel. I was thrilled to discover that I do not actually always need to make a class to import data in a specific (or more specific) table(s). The procedure is: 1) Create your own Definition group - make sure it is empty by removing all checkmarks on the Set up and include table groups tabs pages, and choose the type User defined. Save the def. group. 2) Now click the Table setup button. Choose

Weird experience with tablemaps and layers

Today we experienced something weird in AX2009. We have installed an application module in the AX in the VAR and VAP layers, and are making CUS-layer modifications that are customer specific. In the module a tablemap is used to be able to implement code once but for use on several tables. However we experienced a run-time error when we ran a form, that called the code on the table map. The kernel complained about a field having id 0. We searched high and low but couldn't find any reason for the run-time error that occurred. We then tried making a cus-layer edition of all the mappings on tablemap and voila, no more run time error. Weird. :0S

New job.

As of january 1st 2010, I am no longer employed by thy:data. I will be employed as a Senior System Consultant by Columbus IT Partner Denmark A/S situated at the office in Aalborg.

Check on which tier code is running.

A colleague of mine needed to determine (runtime) what ax-tier his code was running on. We digged around, and he came up with the solution: if (isRunningOnServer()) { // Server } else { // Client } As a footnote he needed this check to make some code to refresh the AOS-code cache, when implementing quick-fixes to an environment running with multiple AOS-instances.

Merging code/elements in Layers

I've been assigned a task where the merge between VAR and CUS-layer of the application is necessary. I like to make my self a TO-do-list of elements to be processed, so I can check an item when it is done. I wrote a small job to identify elements in the application that were represented in both VAR and CUS-layers thus representing a potential layer-conflict. The job produces an info-log with the potential conflicts that can be copied in to Excel to be used as a TO-DO-list. static void JSOVarVapAndCusConflictsJob9(Args _args) { UtilIdElements utilIdElements; UtilIdElements VarVapUtilIdElements; Map elemMap; MapIterator elemMI; UtilElementType recType; RecId utilId; int pos; str 60 elementName; elemMap = new Map(Types::String,Types::String); while select UtilIdElements where (utilIdElements.utilLevel == UtilEntryLevel::cus) && UtilIdElements.parentId == 0 {