Auditing an enterprise integration between a custom React store front and Business Central SaaS resulted to an interesting discovery, every time a customer placed a multi-line order, the middleware made separate HTTP POST requests: one for the order header, and one for each individual order line.Result? 8 – 12 seconds per checkout.Not from slow SQL,…
Read articleLatest articles
Microsoft Dynamics 365 Business Central
A payroll engine was calculating gross earnings across thousands of temp lines. The developer assumed TempRecord.CalcSums(“Amount”) would run fully in‑memory fast, LINQ‑style.Reality check: under certain conditions, unindexed CalcSums on temporary tables forces the NST runtime to hit disk‑backed TempDB, creating massive I/O overhead in O(n) loops. ⚠️ The Problem: The Fake in-Memory IllusionTemporary tables in…
Read articleA logistics workspace I audited had a simple posting page taking 4-6 seconds to open. No loops. No legacy code. Nothing suspicious in OnOpenPage. The real culprit?A custom line table packed with conditional TableRelation rules. Every row rendered on screen triggered multiple schema‑validation lookups across six different tables. The data binding engine was doing a…
Read articleBatch posting 5,000 warehouse entries should not take 20 minutes. Yet telemetry often points to routines like CalculateInventoryTotals() that look harmless on paper.Here is the catch, calling CalcFields(“Inventory”) on the Item record forces SQL to compute totals across potentially millions of ledger entries. Even with filters applied, this can trigger heavy aggregation scans that balloon…
Read articleI was checking a system where users were complaining about random UI freezes. When they click a simple action, the page would spin for a while, but if they tried again, it was instant. The culprit was a heavy background billing run that was updating rows and the default SQL isolation was forcing innocent read…
Read articleUsing a Standard table type for staging large JSON payloads (e.g., 10,000 orders) forces every insert and update to be logged in SQL Server’s transaction log. Telemetry shows this design choice leads to compounding disk write latencies, even when the query logic itself is efficient. The fix isn’t an index or a Commit(). It’s simply…
Read articleUsing Rec.GetView() to copy filters into a second record instance doesn’t just transfer string expressions, it can strip away the active index context. Without that context, SQL Server may ignore available indexes and fall back to massive, unindexed table scans. What should be a sub‑second query can balloon into tens of seconds per loop, hammering…
Read articleThe core mapper procedure used a Variant parameter so it could seamlessly accept records from any table schema. It looked like textbook abstract architecture.During an overnight run processing 50,000 document lines, the tenant’s CPU utilization spiked to 100%, timing out every parallel job queue. Telemetry was not showing long SQL locks. It showed massive, compounding…
Read articleBatch job failing intermittently in production. Zero errors in the event log. Zero traces in the support inbox. Zero clues.We had logs. We had monitors. We had dashboards.What we didn’t have was custom telemetry inside the AL code itself.Four hours later, we added three Session.LogMessage() calls. Root cause found in 20 minutes.Flying blind in production…
Read articleA nightly batch job was producing incorrect financial totals. The issue was erratic. It didn’t happen every night, nor on every run. Just… sometimes.The data looked like a phantom ledger was operating in the shadows. After three days of deep-dive transaction forensics, we found it. A global variable inside a SingleInstance = true codeunit was…
Read article