X++ Compiler Change in Dynamics 365 Finance and Operations 10.0.50: Client and Server Keywords Deprecated

Microsoft is continuing its effort to simplify and clean up the X++ language used in Dynamics 365 Finance and Operations.

One of the upcoming changes concerns the legacy client and server method modifiers. These keywords have been effectively obsolete for many years, and Microsoft is now moving towards their complete removal from the X++ language.

Starting with Dynamics 365 Finance and Operations version 10.0.50, their presence in X++ source code will result in a compiler error.

If your customizations still contain client or server method modifiers, now is a good time to remove them.

What is changing in X++?

The client and server keywords were historically used to indicate where an X++ method should execute.

With the evolution of the Dynamics 365 Finance and Operations platform architecture, however, these modifiers no longer affect runtime behavior.

Microsoft has therefore started the process of removing them from the X++ language.

The transition has already begun:

  • Version 10.0.48 – the X++ compiler introduced warnings for the use of client and server.
  • Version 10.0.50 – their use will generate compilation errors.
  • Future releases – the keywords will eventually be removed from the X++ grammar completely.

This means that developers working on existing Dynamics 365 F&O customizations should clean up these declarations before moving to version 10.0.50.

Why are client and server being removed?

The main reason is that these modifiers have been inert for many years.

They no longer determine where a method executes and do not influence the modern X++ runtime behavior.

As a result, code such as:

public client static void myMethod()
{
    // Method implementation
}

can be simplified to:

public static void myMethod()
{
    // Method implementation
}

The removal of the client keyword does not change the behavior of the method.

The same applies to methods declared with the server modifier.

For example:

public server void processOrder()
{
    // Method implementation
}

should become:

public void processOrder()
{
    // Method implementation
}

Does removing the modifiers change application behavior?

No.

According to Microsoft’s guidance, these keywords no longer have any effect on the execution semantics of X++ code.

Therefore, removing:

client

or:

server

from a method declaration is a code cleanup rather than a functional change.

This is important when preparing existing Dynamics 365 Finance and Operations projects for the 10.0.50 platform update: the required change should generally be straightforward and should not require redesigning the affected methods.

Example: Updating existing X++ code

Consider an existing method:

public client static void updateCustomer()
{
    // Update customer data
}

The updated version should simply be:

public static void updateCustomer()
{
    // Update customer data
}

Another example:

protected server void calculateAmount()
{
    // Calculation
}

becomes:

protected void calculateAmount()
{
    // Calculation
}

The method visibility and other modifiers remain unchanged. Only the obsolete client or server keyword needs to be removed.

How to prepare your Dynamics 365 F&O codebase

If you maintain a large Dynamics 365 Finance and Operations implementation, it is worth checking your custom X++ code before upgrading to 10.0.50.

A simple codebase search for the following keywords can help identify potential occurrences:

client
server

However, developers should review the matches carefully because these words can also appear in comments, strings, variable names, or other contexts where they are not method modifiers.

The goal is specifically to identify method declarations such as:

public client static void ...

or:

public server void ...

and remove the obsolete modifier.

Recommended cleanup checklist

Before upgrading to Dynamics 365 Finance and Operations 10.0.50:

  • Search your X++ source code for client method modifiers.
  • Search for server method modifiers.
  • Remove the obsolete modifiers from affected methods.
  • Compile the affected projects.
  • Review any compiler warnings or errors.
  • Include the cleanup in your normal build and regression-testing process.
  • Make sure no remaining occurrences are reported when preparing the codebase for 10.0.50.

What about Microsoft’s X++ documentation?

Microsoft is also updating the public X++ documentation to remove references to the client and server modifiers.

For the time being, the keywords remain part of the X++ grammar so that the compiler can provide a meaningful diagnostic when they are encountered.

In a future release, Microsoft plans to remove them from the grammar entirely.

This means that the current compiler diagnostics are part of a gradual transition rather than an indication of a change in application execution behavior.

Conclusion

The deprecation of the client and server keywords is a relatively small X++ language change, but it is important for developers maintaining legacy Dynamics 365 Finance and Operations code.

The timeline is particularly relevant:

Dynamics 365 F&O 10.0.48 → compiler warnings

Dynamics 365 F&O 10.0.50 → compiler errors

The required remediation is simple: remove the obsolete client and server method modifiers from your X++ code.

Because these keywords have been inactive for many years, their removal does not change the runtime behavior of the affected methods.

If you maintain custom X++ code, performing this cleanup before the 10.0.50 upgrade will help keep your codebase compatible with the upcoming X++ compiler changes.

This article is based on Microsoft’s communication regarding the upcoming X++ compiler changes and the deprecation of the client and server method modifiers.

Lascia un commento