Runnable Class & Infolog in D365 FO: Your First X++ Hello World
2/10/2026 • 5 min read
When working with Microsoft Dynamics 365 Finance & Operations (D365 FO), you’ll often need to run small pieces of X++ code to test ideas, validate logic, or give feedback to users.
This is where Runnable Classes (Jobs) and the Infolog come in.
Think of this as your “Hello World” moment in D365 FO.
Big Picture — What problem does this solve?
A Runnable Class is the simplest and safest way to execute X++ code directly from Visual Studio.
The Infolog is the built-in message area in the D365 FO web client that shows:
- Information
- Warnings
- Errors
Why this matters:
Before you build forms, tables, workflows, or batch jobs, you must know how to:
- Run code
- Communicate with users clearly
This is a foundational skill every D365 FO developer needs.
Runnable class = play button.
Infolog = message screen.
Simple Analogy — Real-life example
Imagine you’re baking cookies 🍪
- The Runnable Class is pressing START on the oven.
- The Infolog is the oven’s display and beep sounds:
- “Heating…”
- “Almost done…”
- “Error: door open”
Start button = runnable class.
Display messages = Infolog.
Core Concepts — What we’ll learn
1. What is X++?
X++ is the programming language used in D365 FO.
It looks similar to C#/Java and runs mostly on the server side.
2. What is a Runnable Class (Job)?
A class that contains a main method and can be executed via:
Right-click class → Run
3. What is the Infolog?
The message pane in the D365 FO web client.
info("text")→ blue Informationwarning("text")→ yellow Warningerror("text")→ red Error
4. What is Args?
A parameter object passed into main:
public static void main(Args _args)
5. How do we run code?
- Create a Runnable Class (Job) in Visual Studio
- Write X++ code
- Build the project
- Right-click the class → Run
- View messages in the Infolog (top-right bell)
Write
main, run it, see messages
X++ Example — Basic Hello World
Goal:
Say hello, show the current user, current company, and demonstrate message types.
class HelloXppDemo
{
public static void main(Args _args)
{
info("Hello from X++ 👋");
info(strFmt("Current user: %1", curUserId()));
info(strFmt("Current company: %1", curext()));
warning("This is just a demo warning. Nothing is wrong.");
}
}