New capability in X++ : The In operator

We recently added a new feature in X++, making it easier to make certain SQL-where clauses extensible.

Consider this method:

It can now be refactored to support an extender in controlling which LedgerPostingTypes to include in the calculation:

A neat little feature that debuted unnoticed by most.

Comments (7)

  1. Vladii7 says:

    Hello Michael, can we use it (if it was already added in PU16) in PU20? It s crashing there in delete command.

  2. artemt_ says:

    In which D365FO version this IN operator was added?

    Seems like it does not support containers with strings

    1. The feature was added in PU16, and hardened a bit in PU21. So far it only supports enums, and can only be used in where clauses.

  3. EgidijusZ says:

    Is it possible in Dyn365FO EE only (which version), or Ax 2012 as well?

    1. We will not be backporting this capability to AX 2012.

  4. Brent.West says:

    Very nice. What does that translate to in SQL?

    1. Exactly the same TSQL is generated in the two examples.

Skip to main content