慣性聚合 関心のあるブログ、ニュース、テクノロジーを効率的に追跡
原文を読む 慣性聚合で開く

おすすめ購読元

美团技术团队
IT之家
IT之家
博客园 - Franky
博客园_首页
The Cloudflare Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
量子位
阮一峰的网络日志
阮一峰的网络日志
月光博客
月光博客
V
V2EX
Hugging Face - Blog
Hugging Face - Blog
博客园 - 三生石上(FineUI控件)
M
MIT News - Artificial intelligence
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
Stack Overflow Blog
Stack Overflow Blog
小众软件
小众软件
Jina AI
Jina AI
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 叶小钗
Apple Machine Learning Research
Apple Machine Learning Research
B
Blog RSS Feed

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Chain of Command in D365 F&O: three production pitfalls
SapotaCorp · 2026-05-24 · via DEV Community

Chain of Command became the default pattern for F&O customizations because the overlay approach was unsustainable - every One Version update broke something, and partners spent their upgrade budget repairing customizations that should have been forward-compatible by design. CoC lets an extension wrap a base method with next() and skip the overlay dance entirely.

The mechanism takes a minute to read. Three failure modes show up in production often enough to document.

Pitfall 1: forgetting next() when augmenting

Teams new to CoC often write validation extensions that look like this:

[ExtensionOf(tableStr(SalesTable))]
final class SalesTableExt_Extension
{
    public boolean validateWrite()
    {
        if (this.CustomCheck == NoYes::No)
        {
            return checkFailed("Custom check failed");
        }
        return true;
    }
}

Enter fullscreen mode Exit fullscreen mode

The bug: no next validateWrite() call. The base method never runs, so all stock validations silently vanish. Unit tests that exercise only the custom-check path pass. The missing base validations don't surface until data that the base would have rejected makes it through to production.

When the intent is to add logic rather than replace it, call next() first and combine the result:

public boolean validateWrite()
{
    boolean ret = next validateWrite();
    if (ret && this.CustomCheck == NoYes::No)
    {
        ret = checkFailed("Custom check failed");
    }
    return ret;
}

Enter fullscreen mode Exit fullscreen mode

Skipping next() is legitimate sometimes - but it should be deliberate, commented, and reviewed. The accidental skip is where silent data-integrity bugs live.

Pitfall 2: picking the wrong lifecycle hook

FormDataSource.init() runs before records are loaded. Extension code that reads this.cursor() or assumes a record context will throw or behave unpredictably. Teams shipping dynamic filters often put the logic in init() because that's the first hook they see, then get a crash the first time a user with an empty dataset opens the form.

The form-level lifecycle hooks each have a purpose:

  • init() - form-level setup, no data yet
  • executeQuery() - after query is built, before fetch
  • active() - after a record is active on the data source
  • Pre/post-event handler on executeQuery - the cleanest way to mutate the query without overriding the base

For dynamic filtering from a parameter table, a pre-event handler on executeQuery lets you modify the query's ranges with the data context available via the event args. No crash, no base-method override, no brittle downstream coupling.

Pitfall 3: reaching for private or protected members

CoC extensions can't access private or protected members of the base class. Developers migrating from overlay-era F&O hit this first:

[ExtensionOf(classStr(SalesLineType))]
final class SalesLineTypeExt_Extension
{
    public boolean checkPrice()
    {
        // Compile error: _commonPricing is protected
        return this._commonPricing.checkMyThing();
    }
}

Enter fullscreen mode Exit fullscreen mode

Microsoft's extension framework documents four options:

  1. Hookable base method - if the private behavior is surfaced through a public method, call that.
  2. Sibling class access - occasionally a public class exposes enough of what you need.
  3. Event handler on a method that exposes data via args - the cleanest path.
  4. Request access via LCS Issue Search - Microsoft has opened many members in response to partner requests over successive One Version releases.

Reaching for reflection is the wrong answer. It works until the next compile shifts member layout and you're back to overlay-level fragility.

Debugging a silent extension

The most frustrating CoC failure is an extension that compiles, deploys, and does nothing at runtime. Root causes that show up in reviews of working F&O codebases:

  • [ExtensionOf] attribute points to the wrong target - typo in formStr() / tableStr() / classStr().
  • The extension class isn't final - required for CoC.
  • The method signature doesn't match exactly - parameter type mismatches silently skip.
  • The model containing the extension isn't in the target environment's model list.

First diagnostic step: drop info("hit") at the top of the method, recompile, exercise the scenario, check the Infolog. If nothing appears, one of the above is wrong.

Code review as insurance

Teams running healthy F&O codebases treat CoC extensions with a PR-time checklist: next() called correctly, appropriate lifecycle hook chosen, no private-member access attempts, unit test coverage via SysTest. The fifteen minutes per PR is the insurance policy that keeps One Version updates from turning into weekend outages.