Showing posts with label D365FO. Show all posts
Showing posts with label D365FO. Show all posts

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. 

Sunday, 23 November 2025

Talk to Your Data: Instant Insights with Copilot

Talk to Your Data: Instant Insights with Copilot

Why export to Excel just to answer a simple question?

The "Chat with Finance & Operations Data" feature allows users to interrogate their ERP data using natural language. Instead of building complex filters or running reports, you can simply ask Copilot questions about your data, and it retrieves the answer from the live system.

What it does:

A user can type a question into the sidecar, such as:

  • "Show me all customers in the 'Wholesale' group who have invoices overdue by more than 30 days."

  • "What is the total inventory value for item X001?"

Copilot interprets the intent, translates it into a query (using the underlying Dataverse Virtual Entities), and presents the results instantly in a card or grid view.

Key Benefits:

  • Democratized Data: Users don't need to know table names or SQL logic to find information.

  • Speed: Answers in seconds rather than minutes of navigation.

  • Actionable: Users can click through from the chat response directly to the record.

Technical / Developer Input:

For Copilot to "see" your custom X++ tables, they must be exposed as Dataverse Virtual Entities.

X++ Snippet: If you are developing a custom entity and want to ensure it is visible to the Virtual Entity integration (and thus Copilot), ensure the DataManagementEnabled property is true and the Entity Key is correctly defined.

Code snippet
// In your X++ Data Entity property sheet:
// IsPublic: Yes
// DataManagementEnabled: Yes
// PrimaryKey: EntityKey

// To programmatically check if a specific Virtual Entity is available in Dataverse (pseudo-code logic):
if (Microsoft.Dynamics.Platform.Integration.DataEntity.VirtualEntityMetadata::isEntityAvailable("MyCustomEntity"))
{
    info("Entity is ready for Copilot consumption.");
}

Official Microsoft References:

Using Dynamics 365 Finance Data in Copilot Studio

This video demonstrates the technical foundation of connecting Dynamics 365 Finance data to Copilot Studio, which powers these conversational data experiences. 

Stop Searching, Start Asking: Copilot Generative Help

Stop Searching, Start Asking: Copilot Generative Help

Do your users struggle to find the right screen or process in D365?

The Copilot Sidecar in Finance & Operations applications changes the game for user training. Instead of digging through menus or reading 50-page PDFs, users can simply ask "How do I..." questions in plain English.

What it does:

Copilot analyzes the user's question (e.g., "How do I create a vendor payment journal?") and instantly searches Microsoft's public documentation to generate a precise, step-by-step guide directly within the application. It provides links to the exact forms needed.

Key Benefits:

  • Reduced Support Tickets: Users solve their own "how-to" problems instantly.

  • Faster Onboarding: New employees get guidance without needing a mentor constantly by their side.

  • Context Aware: Copilot understands the current form and context to provide relevant answers.

Technical / Configuration Note:

This feature is controlled via Feature Management. For developers or admins, it is critical to ensure the SystemDefinedHelpPane infrastructure is active.

X++ Snippet: If you are building a workspace and want to check if the new Help Pane capabilities are active before rendering custom help buttons:

Code snippet
// Check if the Modern Help Pane feature is enabled
if (FeatureStateProvider::isFeatureEnabled(classStr(SysHelpPaneGenerativeHelpFeature)))
{
    // The system is using Copilot-powered help; suppress legacy help buttons
    this.visible(false); 
}

Official Microsoft References:


AI and Copilot for Dynamics 365 Finance & Operations ERP

This video provides a comprehensive demo of the Copilot capabilities across Finance and Supply Chain Management, including the sidecar experiences.

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...