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 (6)

  1. artemt_ says:

    In which D365FO version this IN operator was added?

    Seems like it does not support containers with strings
    http://dev.goshoom.net/en/2018/12/in-operator-in-d365fo/

    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.

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

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