Sunday, 7 December 2025

Blog Post 6: Bonus – Building Your First Custom Copilot Plugin in X++

Blog Post 6: Bonus – Building Your First Custom Copilot Plugin in X++ 

Introduction

In our previous posts, we explored what Copilot can do out of the box. But as D365 developers, we rarely stay "inside the box." The most exciting capability of Copilot in Finance & Operations is Extensibility.

Did you know you can teach Copilot new skills? You can write X++ code that Copilot triggers when a user asks a specific question. In this bonus post, we will walk through the architecture of a Client Plugin—a custom action that lets Copilot perform tasks inside the D365 client.


Caption: Turning your X++ logic into natural language skills.

The Concept: Client Actions

A "Client Action" allows Copilot to interact with the D365 interface based on user intent.

  • User says: "Take me to the release products form."

  • Copilot thinks: "I need a navigation plugin."

  • X++ executes: Your code runs and performs the navigation.

The Code: How It Works

Microsoft has introduced new classes and attributes specifically for this. You don't need to be a Python expert; you just need to know the SysCopilotChatAction class.

Here is a simplified example of what a custom "Navigation" plugin looks like in X++:

Code snippet
[DataContract]
[SysCopilotChatGlobalAction] // Defines this as a global action available anywhere
[SysCopilotChatActionDefinition(
    identifierStr(MyCustom.NavigationPlugin), 
    'Navigate', 
    'Navigates to a specific form based on user input', 
    menuItemActionStr(MyNavigationMenuItem), 
    MenuItemType::Action)]
public final class MyNavigationPlugin extends SysCopilotChatAction
{
    [DataMember('FormName')]
    public str parmFormName(str _formName = formName)
    {
        formName = _formName;
        return formName;
    }

    public void executeAction(SysCopilotChatActionDefinitionAttribute _actionDefinition)
    {
        // Your logic to open the menu item or form goes here
        new MenuFunction(menuItemDisplayStr(MyTargetForm), MenuItemType::Display).run();
    }
}

Key Components

  1. Attributes: The [SysCopilotChatActionDefinition] attribute is the "metadata" that tells Copilot what this class does. The description you write here is actually read by the AI to understand when to use this plugin.

  2. Data Contract: Input parameters (like FormName in the example above) are filled automatically by Copilot extracting information from the user's chat.

  3. Copilot Studio: Once you deploy this code, you register the action in Microsoft Copilot Studio (formerly Power Virtual Agents) so the chat bot knows it exists.


Caption: Connecting the "Brain" (Copilot Studio) to the "Body" (D365 X++).

Why Build Custom Plugins?

  • Complex Calculations: Let users ask "What is the projected margin for Item X?" and run a complex X++ price engine logic to give the answer.

  • Workflows: Create a skill like "Submit this purchase order for approval" that triggers a workflow via code.

  • Navigation: Build shortcuts for complex forms that users struggle to find.

Wrap Up

This brings our series to a close! We have gone from simple "Help" prompts to writing custom AI-driven code. The tools are in your hands—now it is time to build. 

Blog Post 5: The Road Ahead – Preparing Your X++ Code for an AI World

Blog Post 5: The Road Ahead – Preparing Your X++ Code for an AI World

Introduction

We have journeyed through the immediate benefits of Copilot in D365 Finance & Operations—from generative help to automated collections. But for those of us who live in Visual Studio and write X++, a bigger question looms: How does this change our job?

In this final post of our series, we look at the future of development in D365 and how you can start writing code today that is ready for the AI of tomorrow.


Caption: The path forward for Dynamics developers.

The Shift: From Logic to Context

Historically, X++ developers focused on writing complex business logic. While that is still important, the new paradigm requires us to focus on Context and Metadata.

Why? Because AI (like Copilot) doesn't read your raw X++ code classes; it reads the metadata that describes your data.

  1. Data Entities are King: If you want Copilot to query your custom tables, you must expose them via Public Data Entities.

  2. Labels Matter: "Field1" and "Field2" won't cut it anymore. Meaningful labels and help text are now the "prompts" that tell the AI what your data means.

  3. Clean Core Strategy: The more you customize the standard application, the harder it is for standard AI models to function correctly. Extending via events and avoiding intrusive customization is more critical than ever.

The Developer’s New Toolbelt

Microsoft is not just putting AI in the app; they are putting it in our tools.

  • GitHub Copilot for X++: It is becoming increasingly capable of understanding X++ syntax, helping generate boilerplate code, write test classes, and explain complex legacy code.

  • Power Platform Integration: The future of "customization" is often a Power App or Power Automate flow wrapped around D365 logic. Developers need to be comfortable stepping outside of Visual Studio.


Caption: Writing code that serves as building blocks for AI.

Preparing for the Future

To stay relevant, start doing these three things today:

  1. Refactor for Readability: Write clean, modular code. AI tools can better optimize and test code that is well-structured.

  2. Embrace Dataverse: Ensure your key tables are synced to Dataverse via Dual-write or Virtual Entities. This is often the bridge AI uses to access your data.

  3. Learn the "Why": Don't just take requirements at face value. Ask why a user needs a specific report. Often, an AI query or a standard workspace is a better, more maintainable solution than a custom SSRS report.

Conclusion to the Series

The AI revolution in ERP isn't coming; it's already here. From the Generative Help that trains our users, to the Collections Coordinator that secures our revenue, and the Natural Language Queries that democratize our data.

As developers, we are the architects of this new reality. By embracing these tools and shifting our mindset, we don't just "keep up"—we lead the way.

Thank you for joining me on this 5-part journey into the world of Copilot in D365 FO! 

Post 4: Just Ask – Unlocking Insights with Natural Language Query

Post 4: Just Ask – Unlocking Insights with Natural Language Query 

Introduction

For decades, getting answers from an ERP system meant one of two things: mastering complex grid filters (Advanced Filter/Sort) or waiting days for a developer to build a custom report. If you wanted to know "Who are my top customers in California?", you had to know the exact field names and logic to get the list.

In Part 4 of our AI series, we look at Natural Language Query, a feature that democratizes data access by letting you simply ask for what you need.


Caption: No code, no filters—just plain English.

What is Natural Language Query?

This feature allows users to interact with data grids and lists using everyday language. Powered by Copilot, D365 Finance & Operations translates your plain English questions into the complex query syntax the system understands.

Instead of clicking "Filter" -> "Add Condition" -> "Field: Status" -> "Value: Open," you simply type: "Show me open orders."

Examples of What You Can Ask

The flexibility is impressive. Here are a few ways users are utilizing this today:

  • Sales: "Show me sales orders from last month where the total is greater than $10,000."

  • Inventory: "List all items with low stock levels."

  • Finance: "Display vendors with payment terms of Net 45."


Caption: The system dynamically applies filters based on your question.

Why This Matters

  1. Speed: Ad-hoc analysis becomes instantaneous. You don't need to export to Excel just to filter data.

  2. Accessibility: Managers who aren't "power users" of D365 can still get their own answers without relying on IT.

  3. Discovery: It helps users find data even if they don't know the exact technical name of the column (e.g., typing "Client" might correctly search the "Customer Name" field).

A Note for Developers

You might be wondering: "Does this bypass security?" The answer is no. Copilot respects all existing security roles and Row Level Security (RLS). If a user doesn't have permission to see a specific legal entity or data field, Natural Language Query won't show it to them.

However, as developers, we need to ensure our Table and Field labels are clear. Copilot relies on meaningful metadata to understand that "Qty" means "Quantity." 

Revolutionizing Cash Flow – The AI Collections Coordinator

 Revolutionizing Cash Flow – The AI Collections Coordinator

Get Paid Faster: How Copilot Transforms Credit and Collections in D365 FO  


Introduction

The "Collections" department often has the hardest job in finance. Agents spend hours digging through aged balances, reading months of email threads, and piecing together payment promises just to make a single phone call. It is manual, tedious, and prone to error.

In Part 3 of our series, we explore how Copilot steps into the role of a Collections Coordinator, turning hours of research into seconds of insight.


Caption: Moving from chaotic manual tracking to AI-assisted precision.

The Problem: Information Overload

Before calling a customer about an overdue invoice, an agent needs to know:

  1. What is the total outstanding amount?

  2. When did we last speak?

  3. Did they promise to pay next week?

Gathering this information usually requires clicking through five different screens. Copilot changes this by consolidating everything into a single, AI-generated summary.

How Copilot Helps

When you open the Collections Coordinator workspace, Copilot analyzes the customer's history and provides:

  • Instant Account Summaries: It reads recent activities, notes, and payment history to give you a natural language summary (e.g., "Customer X has a large overdue balance but promised to pay invoice #123 by Friday").

  • Drafting Communication: Copilot can draft a reminder email for you. It pulls the specific invoice numbers, dates, and amounts, striking the right tone—polite for a first reminder, or firm for a severely overdue account.


Caption: Copilot summarizes the account status instantly.

Real-World Impact

This feature is a game-changer for cash flow. By removing the 15 minutes of "prep time" needed before every collection call, agents can contact more customers per day. The AI-drafted emails ensure that communication is professional and accurate, reducing the risk of human error (like citing the wrong invoice number).

, just a friendly reminder regarding invoice #555..."] Caption: Auto-drafted emails that are personalized and accurate.

A Note for Developers & Admins

To get this working, you aren't writing code, but you are managing connectivity. This feature relies on the connection between D365 Finance and the Dataverse. As a technical lead, ensuring your Dual-write or Virtual Entity configurations are healthy is critical for Copilot to access the data it needs to generate these summaries. 

Empowering Users: How Copilot’s Generative Help is Changing D365 Training

 Empowering Users: How Copilot’s Generative Help is Changing D365 Training 

Introduction

We have all been there. You are working in a complex form in Dynamics 365 Finance & Operations, you encounter a field you don't recognize, and you have to stop. You open a new tab, search through Microsoft Learn (or a dusty PDF manual), and try to find the answer.

In Part 2 of our AI series, we look at Generative Help and Guidance—a feature that aims to make those interruptions a thing of the past by bringing the answers directly to you.


Caption: Transforming confusion into clarity with in-app AI assistance.

What is Generative Help?

Generative Help uses the power of AI to ingest public documentation (like Microsoft Learn) and potentially your organization's own process guides. When a user asks a question like "How do I release a product to a specific legal entity?" inside the Copilot sidecar, the AI generates a concise, step-by-step answer right then and there.

How It Works Under the Hood

It isn't just searching for keywords. Copilot understands the context of the form you are currently viewing.

  1. Context Awareness: If you are on the "All Vendors" form, Copilot knows your questions are likely about procurement or vendor management.

  2. Summarization: Instead of giving you a link to a 10-page article, it reads the article for you and summarizes the exact steps needed.

  3. Navigation: In some advanced scenarios, Copilot can even guide you to the specific menu item you need.


Caption: Instant answers without leaving the workflow.

The Benefit for Businesses

For organizations, the ROI here is clear:

  • Reduced Onboarding Time: New employees spend less time reading manuals and more time working.

  • Fewer Support Tickets: Users can solve simple "how-to" problems themselves.

  • Standardization: Everyone gets consistent answers based on the official documentation.

A Note for Developers

While this feature is largely "out of the box," developers and admins play a crucial role in enabling it. You must ensure that the feature is enabled in Feature Management and that your users have the correct security privileges to access the Copilot pane. 

The AI Revolution in ERP – Meeting Copilot in D365 Finance & Operations

 Introduction

The world of Enterprise Resource Planning (ERP) is undergoing a massive shift. For years, we’ve relied on manual data entry, complex grids, and rigid reporting. But with Microsoft's introduction of Copilot in Dynamics 365 Finance & Operations, the game has changed. This isn't just a chatbot; it's an AI assistant deeply embedded into your daily workflows.

In this first post of our 5-part series, we will explore what Copilot actually is within the D365 FO ecosystem and why it matters for developers and end-users alike.


Caption: AI meets ERP: The new standard for business operations.

What is Copilot in D365 FO?

Copilot is an AI-powered assistant that leverages Large Language Models (LLMs) to interact with your data. Unlike traditional automation that follows strict "If/Then" rules, Copilot understands natural language.

It allows users to:

  • Ask questions about their data in plain English.

  • Draft content like collection letters or emails automatically.

  • Analyze trends without needing to build a complex Power BI report from scratch.

Key Capabilities at a Glance

FeatureDescriptionBenefit
Generative HelpContext-aware guidance inside the app.Reduces training time for new users.
Collections CoordinatorAI-generated summaries of customer accounts.Speeds up cash flow recovery.
Natural Language Query"Show me sales from last week."Removes the need for complex filtering knowledge.

Caption: The Copilot sidecar providing instant account summaries.

Why Should Developers Care?

For us developers (specifically X++ engineers), this changes how we think about customization. We are moving away from building rigid reports and toward enabling data entities that AI can understand. The future of development involves configuring Copilot to ensure it accesses the right data securely.

Blog Post 6: Bonus – Building Your First Custom Copilot Plugin in X++

Blog Post 6: Bonus – Building Your First Custom Copilot Plugin in X++  Introduction In our previous posts, we explored what Copilot can do o...