Skip to main content

Posts

Featured Post

The Silent Killer: Parameter Sniffing & Query Keywords in D365 F&O

It works in Dev. It works in UAT. It crashes in Production. If you are a D365 F&O Lead Developer, you know this story. The culprit is rarely the code logic itself—it is the translation layer between the D365 Kernel and the SQL Server Optimizer. Performance in D365 F&O is not just about writing efficient X++; it is about controlling the T-SQL that the kernel generates. When the system behaves erratically—fast one minute, slow the next—you are likely facing Parameter Sniffing . In this post, we are going deep into the mechanics of the SQL Plan Cache and the specific X++ keywords ( forceLiterals , forcePlaceholders , forceNestedLoop ) that give you control over the execution plan. The Mechanics of Parameter Sniffing To fix the problem, we must understand the mechanics. When you execute an X++ query, the Kernel translates it into T-SQL. By default, it Parameterizes the query. The Workflow: X++: select * from SalesTable...
Recent posts

Solving the "Compilation failed" Error in D365FO Power Platform Packaging Pipelines

How to diagnose and defeat the "Diamond Dependency Trap" and undocumented API mismatches in Azure DevOps when building Unified Deployable Packages (UDE) for Dynamics 365 Finance and Operations. The Problem: When enabling Power Platform Cloud Package generation, the Azure DevOps packaging task often crashes with generic errors like Compilation failed: or Cannot bind argument to parameter 'Path' because it is null . The true culprit is a hidden architectural mismatch inside the orchestration of the build tasks. The Shift to Power Platform Unified Packages Microsoft is steadily transitioning Dynamics 365 Finance and Operations (D365FO) deployments away from traditional Lifecycle Services (LCS) Deployable Packages and toward modern Power Platform Unified Packages . To facilitate this transition, DevOps pipelines are configuring tasks to generate both legacy and cloud package formats simultaneously. Howev...

Mastering Default Dimensions in D365 F&O

Mastering Default Dimensions in D365 F&O: X++ Helper Methods to Create, Read, and Update One of the most common yet complex tasks in X++ development for Dynamics 365 Finance and Operations is manipulating Financial Dimensions. Whether you are importing data, integrating with external systems, or simply updating a record based on business logic, interacting with the DimensionAttributeValueSet framework is inevitable. To save you time, I have put together a set of static helper methods that handle the "heavy lifting" of the DimensionAttributeValueSetStorage class. Below are three essential methods to Create , Read , and Update Default Dimensions. 1. Creating a New Default Dimension If you have a list of dimension names and their corresponding values (for example, coming from a CSV import or an integration), you need to generate a new RecId for the DefaultDimension field. This method accepts two containers: one for dimension names (e.g., Department, CostCen...

Handling Temporary Files and Browser Downloads in D365FO

Deep Dive: Handling Temporary Files and Browser Downloads in D365FO In the transition from Dynamics AX 2012 to Dynamics 365 Finance & Operations, file handling has undergone a paradigm shift. Because the application is cloud-hosted, developers can no longer rely on local file system paths like C:\Temp . Instead, professional X++ development requires understanding System.IO.Streams and Azure Blob Storage interaction. This article explores how to generate files efficiently, manage memory, and force specific browser behaviors. 1. The Architecture: Where does the file go? When you generate a file in X++, it exists initially in the AOS server's memory. To get it to the user's browser, the system follows this sequence: Stream Generation: Data is written to a .NET MemoryStream . Azure Upload: The system uploads this stream to a temporary Azure Blob Storage container via the File::SendFileToTempStore method. ...

D365F&O: Create and Use Custom Lookups (Updated Guide)

D365F&O: Create and Use Custom Lookups In this article, we will cover how to create a lookup form and link it with an EDT or String field in Dynamics 365 Finance & Operations using Extensions and Chain of Command. Technical Prerequisites Chain of Command (CoC): We will use extension classes to override form control behavior. Form Patterns: We will use the "Lookup Basic" pattern to ensure the form renders correctly as a popup in the web browser. Scenario We need to override the system lookup to apply custom logic, filters, or use a completely custom Form design as a lookup for a specific field. 1. Standard String/EDT Field Lookup (via Chain of Command) Use this when you want to filter a specific field using X++ query logic without creating a new custom lookup form. Class: Form Data Source Field Extension // Override lookup for CustG...

Dive: Understanding State and Status in the Orchestrator Database

Deep Dive: State and Status in D365 On-Premise (LBD) Deep Dive: Understanding State and Status in D365 On-Premise (LBD) In Dynamics 365 Finance & Operations On-Premises (LBD), troubleshooting often requires looking at two independent layers: The Logical Layer (Orchestrator Database) The Physical Layer (Service Fabric Cluster) Part 1: The Logical Layer (Orchestrator DB) The Orchestrator defines what should happen. Its core table is Deployment . The state machine here represents the “intended plan.” 1. DeploymentState (What stage are we in?) These states follow a generally linear lifecycle. stateDiagram-v2 [*] --> Undefined Undefined --> Preparing: User Clicks Deploy Preparing --> Downloading: Local Agent downloads package Downloading --> Prepared: Package Ready Prepared --> Deployin...

Fix SSRS Parameter Panel Layout Error

Fix SSRS Parameter Panel Layout Error [Fix] SSRS Error: "The parameter panel layout for this report contains more parameters than total cells available" Tags: #SSRS #Dynamics365 #SQLServer #ReportingServices #Troubleshooting If you have been working with SSRS (SQL Server Reporting Services) lately—especially within the Dynamics 365 environment—you might have encountered a frustrating error when trying to deploy a report after adding a new parameter. It usually happens when you add a Hidden Parameter or modify the existing list, and suddenly the deployment fails with this severity code: Error: The parameter panel layout for this report contains more parameters than total cells available. Source: Microsoft.ReportingServices.Library.ReportingService2005Impl.CreateReport The Scenario You have an existing report. You need to add a new par...

Developing SSRS Reports Using Report Data Provider in D365F&O

Developing SSRS Reports Using Report Data Provider in D365F&O In this article, we will cover the Report Data Provider (RDP) class and the Report Contract class. We will also learn how to implement these classes for reporting needs in Dynamics 365 Finance & Operations and create a report using the RDP class via a step-by-step walkthrough. Report Data Provider (RDP) Framework A Report Data Provider (RDP) class is an X++ class used to access and process data for a report. An RDP class is an appropriate data source type when the following conditions are met: You cannot query directly for the data you want to render on a report. The data to be processed and displayed is complex and requires specific business logic. Report Data Provider Class This is an X++ class used to access and process data for an SSRS report. The RDP class processes business logic based on specified parameters and/or queries and return...

Developing SSRS Reports Using a Query in D365F&O

Developing SSRS Reports Using a Query in D365F&O In this tutorial, we will learn how to develop a report based on a predefined Query in the Application Object Tree (AOT) within Visual Studio. This method is often faster than using a Report Data Provider (RDP) class when complex business logic is not required. Scenario: We will create a report that prints a simple list of customer transactions directly from the CustTrans table without writing X++ business logic. Step 1: Create the Project and Query Unlike previous versions of Dynamics, all development for D365F&O occurs inside Visual Studio. Open Visual Studio as an administrator. Create a new Finance and Operations project. In the Solution Explorer , right-click the project node. Select Add > New Item . Select Query from the list and name it CustomerTransactionQuery . Click Add . Configuring the Data Source...