Posts Tagged ‘ XPO ’

From XPO to XML: AI-Assisted X++ Code Upgrade from AX 2009 to Dynamics 365 ERP

When a move from AX 2009 to Dynamics 365 Finance & Operations comes up, one of the topics we focus on most is how to migrate the customizations developed over the years. In a system that has been in use for a long time, tables, classes, forms, and reports become part of the way the company operates. Identifying which customizations are still needed, understanding the existing business logic, and adapting it to the new version form an important part of the transition.

There are significant differences between the two versions from a development perspective. Finding the Dynamics 365 equivalent of an AX 2009 form, report, or modification to a standard object is not always straightforward. While we can migrate some structures in a similar way, others need to be reconsidered using the methods available on the new platform. Compiling the code alone is not enough, either. We need to check that forms, reports, and business rules work as expected.

So where can we use AI in this process? How can we establish a workflow for understanding X++ code, identifying dependencies between objects, and generating code suitable for the target version? This is one of the topics I have been working on recently. I believe we can use AI more systematically in the code upgrade process, particularly when we define transformation rules in advance and regularly validate the generated results.

In this article, we will use XPO files exported from AX 2009 as our starting point. We will examine the source objects with Claude Code, establish transformation rules, and migrate them to the metadata XML structure used by Dynamics 365. Throughout the process, we will discuss which changes are mandatory, where decisions are needed, and how we can check the generated objects. Using a car rental module, we will examine tables, forms, and the conversion of MorphX reports to SSRS step by step.

One point I particularly care about here is being able to trace the reasons behind the changes. We should be able to see how a field, method, or relationship is represented in the target version. When we find an error in the source code, we should also be able to distinguish it from the changes required for the version upgrade. The rule set and decision records we create will help us both control the transformation and reuse the knowledge in subsequent development work.

The scope of this article is the migration of application code and metadata structures. Migrating transaction data, balances, and historical transactions requires a separate effort. Here, we will focus on the process from code analysis through compilation in the target environment, using the forms, and generating report output.

Before we begin

Before moving on to code migration, we need to prepare the source files and the target development environment. It is just as important for AI to know which structure to use when creating objects and how to validate them as it is for it to read the source code. We will therefore begin by bringing together XPO files, labels, working examples from the target environment, and compilation tools.
Read more

XPO’dan XML’e: Yapay Zekâ Desteğiyle AX 2009’dan Dynamics 365’e X++ Kod Yükseltme

AX 2009’dan Dynamics 365 Finance & Operations’a geçiş gündeme geldiğinde, üzerinde en çok durduğumuz konulardan biri yıllar içinde yapılan geliştirmelerin nasıl taşınacağı oluyor. Uzun süredir kullanılan bir sistemde tablolar, sınıflar, formlar ve raporlar şirketin iş yapış biçiminin bir parçası haline geliyor. Bu geliştirmelerin hangilerine hâlâ ihtiyaç olduğunu belirlemek, mevcut iş mantığını anlamak ve yeni sürüme uyarlamak geçişin önemli bir bölümünü oluşturuyor.

İki sürüm arasında geliştirme açısından ciddi farklar var. AX 2009’daki bir formun, raporun veya standart nesne üzerinde yapılan değişikliğin Dynamics 365’teki karşılığını bulmak her zaman kolay olmuyor. Bazı yapıları benzer şekilde taşıyabilirken bazılarını yeni platformun sunduğu yöntemlerle yeniden ele almamız gerekiyor. Üstelik kodun derlenmesi de tek başına yeterli değil. Formların, raporların ve iş kurallarının beklediğimiz şekilde çalıştığını kontrol etmemiz gerekiyor.

Peki, yapay zekâyı bu sürecin neresinde kullanabiliriz? X++ kodunu anlamak, nesneler arasındaki bağımlılıkları çıkarmak ve hedef sürüme uygun kod üretmek için nasıl bir çalışma düzeni kurabiliriz? Son dönemde üzerinde çalıştığım konulardan biri bu. Özellikle dönüşüm kurallarını önceden tanımladığımızda ve üretilen sonucu düzenli olarak doğruladığımızda, kod yükseltme sürecinde yapay zekâdan daha sistemli şekilde yararlanabileceğimizi düşünüyorum.

Bu yazıda AX 2009’dan aldığımız XPO dosyalarını başlangıç noktası olarak kullanacağız. Claude Code ile kaynak nesneleri inceleyecek, dönüşüm kurallarını oluşturacak ve Dynamics 365’in kullandığı metadata XML yapısına taşıyacağız. Süreç boyunca hangi değişikliklerin zorunlu olduğunu, hangi noktalarda karar vermemiz gerektiğini ve üretilen nesneleri nasıl kontrol edebileceğimizi ele alacağız. Araç kiralama modülü üzerinden tabloları, formları ve MorphX raporlarının SSRS’e dönüşümünü adım adım inceleyeceğiz.

Burada özellikle önemsediğim konu, yapılan değişikliklerin nedenini takip edebilmek. Bir alanın, metodun veya ilişkinin hedef sürümde nasıl karşılandığını görebilmeliyiz. Kaynak kodda bir hata bulduğumuzda da bunu sürüm geçişi için gereken değişikliklerden ayırabilmeliyiz. Oluşturacağımız kural seti ve karar kayıtları, hem dönüşümü kontrol etmemizi hem de sonraki geliştirmelerde aynı birikimden yararlanmamızı sağlayacak.

Yazının kapsamı uygulama kodunun ve metadata yapısının taşınması olacak. İşlem verilerinin, bakiyelerin ve geçmiş hareketlerin aktarılması ayrı bir çalışma gerektiriyor. Burada kodun analizinden başlayıp hedef ortamda derlenmesine, formların kullanılmasına ve rapor çıktılarının alınmasına kadar uzanan sürece odaklanacağız.

Başlamadan önce

Kod taşıma sürecine geçmeden önce kaynak dosyaları ve hedef geliştirme ortamını hazırlamamız gerekiyor. Yapay zekânın kaynak kodu okuyabilmesi kadar, ürettiği nesneleri hangi yapıya göre oluşturacağını ve nasıl doğrulayacağını bilmesi de önemli. Bu nedenle çalışmaya XPO dosyaları, etiketler, hedef ortamda çalışan örnekler ve derleme araçlarını bir araya getirerek başlayacağız.
Read more