← DocumentationDocumentation

X++ & Microsoft D365 standards

How Skalp AI follows Microsoft extension patterns, applies XppBP and FxCop conventions, and ensures compatibility with One Version release waves.

The 3 supported extension patterns

Since Dynamics 365 F&O 7.0 (formerly AX 7), Microsoft replaced over-layering with an extension model. Microsoft core code can no longer be modified directly; you add your business logic using 3 official patterns.

Skalp AI uses exclusively these 3 patterns. No over-layering is ever generated, ensuring your developments survive One Version release waves (twice a year) and major upgrades without human intervention.

Pattern choice depends on the business need: extend a table → Table Extension; modify existing behavior → Chain of Command; react to an event → Event Handler. Skalp AI selects the most appropriate pattern and documents it in the Pull Request comment.

Pattern 1 — Chain of Command (CoC)

Chain of Command (CoC) lets you extend an existing method without replacing it. You wrap the standard Microsoft method with your own logic before and/or after the original call. It is the recommended pattern to change the behavior of a standard class, table or form.

Skalp AI generates CoC extension classes when you need to add a validation, calculation, side-effect or transformation around an existing method. Code follows the [ExtensionClassName]_Extension naming with attribute [ExtensionOf(classStr(StandardClass))].

Typical example: add a consistency check to PurchOrder validation before save, without touching Microsoft code. The ticket generates a wrapper class that calls next then adds your business check.

Pattern 2 — Event Handlers

Event handlers subscribe to pre- or post-method events published by standard Microsoft objects. When the event fires (onValidatingWrite, onInsert, onClicked, etc.), your handler runs.

Skalp AI generates event handlers when the business need is asynchronous by nature: trigger an integration, send a notification, feed an audit log, or react to a status change. Code is packaged in a static class with [SubscribesTo(...)] attributes.

Key benefit: an event handler is fully decoupled from the main code. It can be disabled without impact on the standard flow. Ideal for optional features or module-specific functionality.

Pattern 3 — Extension classes (tables, forms, enums)

Extension classes let you add fields, methods, controls or values to a standard Microsoft entity without duplicating it. It is the simplest pattern: extending the object definition rather than its behavior.

Skalp AI generates Table Extensions to add business fields (profit center, GDPR flag, external reference…), Form Extensions to adapt screens (tab addition, conditional hiding, custom button), and Enum Extensions to extend business value lists.

The extension automatically follows the Microsoft naming convention: .Extension suffix, business prefix consistent with your model (e.g. SKL_CustTable_Extension), systematic [ExtensionOf(...)] attribute.

No over-layering — ever

Over-layering (direct modification of Microsoft code via the SLN, USR layer, etc.) was the norm until AX 2012. Microsoft officially deprecated it since D365 F&O 7.0 and made it technically impossible in cloud environments from 10.0.

Skalp AI NEVER generates over-layering, even on migration from AX 2012. Any AX 2012 over-layered code is systematically rewritten in an extension pattern (CoC, event handler or extension class as appropriate) during migration.

Practical consequence: your Skalp AI code survives One Version release waves without intervention. You avoid the major technical debt that slows most D365 customers during upgrades.

SysTest and ATL unit tests

Any code generated by Skalp AI ships with unit tests. You can run them in your Azure DevOps pipeline via the standard SysTest runner, and require a minimum coverage threshold in your branch policies.

  • SysTest framework (Microsoft native): isolated tests on X++ extension classes, dependency mocking via standard patterns.
  • Acceptance Test Library (ATL): Microsoft helpers for data setup, transactional isolation and business assertions — usable alongside SysTest if your test strategy relies on it.
  • Tests runnable locally in Visual Studio (Test Explorer) and in the Azure DevOps CI pipeline (Run SysTest step on the build image).
  • Coverage measurable via the native SysTest report (per class, per method, per line). Configurable as Pull Request gate if you want to block merges below a given threshold.
  • Tests deliberately minimal — focus on business behavior, not trivial wrappers. You keep control of your overall test strategy.

XppBP / FxCop conventions respected

Generated code passes by default the XppBP (Best Practice) and FxCop rules enabled in your Azure DevOps CI pipeline. No post-delivery rework expected.

  • Class naming: consistent business prefix (analyzed by default from your existing code; configurable per ticket).
  • Encapsulation: minimal public methods, private members by default, no business logic in global static helpers.
  • Error handling: throw error() with label/labelId, never a hardcoded X++ message.
  • Performance: optimized queries via QueryBuildDataSource, no while select in loops, indexing respected.
  • Security: Privileges/Duties/Roles respected, no direct access to sensitive tables without authorization check.
  • Inline documentation: XML comments on public methods to ease maintenance.

One Version compatibility

Microsoft ships One Version as successive release waves (typically 8 waves per year, with intermediate service updates). Each wave can introduce method signature changes, deprecations or new events.

Skalp AI generates code that follows the current public contracts documented by Microsoft. When a signature changes in a release wave, your CoC extensions may need a minor update (signature change) — automatically detected during CI build.

For each release wave, Microsoft publishes an "upgrade analyzer" that flags impacted extensions. If one of your Skalp-AI-generated extensions is impacted, you can submit an update ticket (typically €200 to adapt to the new signature, sometimes requalified as bonus without billing).

Statistically, fewer than 5% of extensions are impacted per release wave. The ratio improves with extension patterns which are the long-term Microsoft-supported path.

Frequently asked questions

Is the generated code owned by Microsoft or Skalp AI?

Neither: code generated for your tickets is your intellectual property, delivered in your Azure DevOps repo. This contractual commitment is stated in the framework agreement signed at kickoff. Skalp AI never reuses your code to train its models nor shares it with other clients.

Can Skalp AI use third-party libraries (NuGet)?

On D365 F&O, external libraries are restricted by Microsoft (no free NuGet additions in an extension model). Skalp AI uses only libraries officially referenced by your existing model + those allowed by Microsoft (System.Net, Newtonsoft.Json for custom services, etc.).

How does Skalp AI handle conflicts between extensions?

If two extensions wrap the same method via CoC, execution order is defined by model reference order. Skalp AI always places its extensions at the end of the chain so as not to break existing dependencies. If a conflict is detected during pre-generation analysis, the ticket is notified and requalified.

Does it work with Dynamics 365 Commerce / Retail?

Yes. D365 Commerce (Retail) uses the same technical foundation as F&O — extensions, X++, models. Patterns are strictly identical. Customizations on Commerce HQ, Modern POS / Cloud POS and headless e-commerce supported.

What about generated code security?

All standard D365 controls (Privileges, Duties, Roles, Record-Level Security) are respected. Skalp AI never generates a security bypass. For critical topics (financial, HR, personal data), a specific review by your CISO is recommended before merge — even though technically the code follows Microsoft patterns.

Convinced by code quality?

Generated code stays 100% in your repo. You keep full control.

Join the waitlist