Skip to content

How to: extension-first philosophy

How-to · Core Studio 3.0 · Verified 2026-09-01

Goal: customize F&O the way upgrades survive — by extension, never by editing Microsoft’s code — and understand the guardrails the Studio puts around that philosophy.

Why extension-first

Microsoft’s models are read-only in the Studio (attempting to update one is refused). That’s not a limitation — it’s the product enforcing the only customization strategy that survives platform updates:

  • Extensions add, they don’t modify. Your _Extension class, your table extension, your event handler — new artifacts that reference Microsoft’s rather than changing them in place.
  • The compiler is the referee. Scaffolding targets “first-build-clean against the real xppc” — not “looks right in the editor.”

How the Studio scaffolds

The new-object flows (right-click a type node or element in the AOT explorer, File → New X++ Object, or F1) follow the ecosystem’s canonical order — the same element ordering Microsoft’s own files use, so generated artifacts diff cleanly and validate the first time. Naming follows the extension conventions: <Target>_Extension for classes, <Table>.<Suffix> for table extensions.

Generation lands in <root>/<Model>/<Module>/<AxType>/, then re-indexes and opens the file — you’re editing real, indexed code seconds later.

Reading the best-practice advisor

The advisor checks the ecosystem’s coding rules continuously (source xpp-bp, in the Problems panel). It’s not lint noise — each rule exists because the ecosystem learned it the expensive way:

  • use-labels — hardcoded strings like info("Done") break localization; use label references.
  • Rules fire as you type, so the fix costs seconds, not a code-review round-trip.

Verify it worked

  • A scaffolded extension compiles first-build-clean.
  • Introducing a hardcoded string raises use-labels immediately.

If it goes wrong

  • Tempted to edit a Microsoft file — you can’t; that’s the point. Extend instead (the next three pages are the worked examples).

Next: CoC extension classes · table extensions · event handlers.