Are you creating an AOT Query and want to create a filter condition by an ENUM field? In the AOT query you can do it by using a data source Range object In the value field property just insert the numeric or string value of the the ENUM field. In this example I used the string value … Continue reading AX / D365fo – Filter by Enum value in an AOT Query
Category: Enums
AX / D365FO – How to get a Base enum integer internal value with a SQL Server query or a Job
Are you like me going crazy to figure out how to find the integer value of an enum type? No problem, the solution is around the corner. In this case you have 2 options : Open SSMS SQL session and run a query.Create a job / Runnable class SQL Query select t1.NAME,t2.ENUMID,t2.ENUMVALUE,t2.NAME EnumValueName from ENUMIDTABLE … Continue reading AX / D365FO – How to get a Base enum integer internal value with a SQL Server query or a Job
AX – D365FO – Loop through values of a Base enum – X++
SysDictEnum SysDictEnum = new SysDictEnum(enumNum(SalesStatus)); int i; for (i=0;i<SysDictEnum.values();i++) { info(SysDictEnum.index2Label(i)); }
AX – D365FO – Set NULL/Empty value as a default value on an enum type
It's not possible to set an enum type with a null value This is default behavior of Base Enumeration. By default if user doesn't choose a value the index 0 is defaulted for new record. If you want to achieve what you are looking for, you may add a third element in Base Enum, set … Continue reading AX – D365FO – Set NULL/Empty value as a default value on an enum type
AX – D365FO – SSRS – Use Enum values in filter expressions
This article describes how to use enum values in filter expressions : https://robscode.onl/ssrs-use-enum-values-in-filter-expressions/
D365FO – AX – Convert an enum into a string
Info(enum2Str(SalesStatus::Backorder)); //this will display 'Open order'
AX – D365FFO – Write extensible enums
An enumeration (enum) is made extensible by setting the following enum properties: Is Extensible = TrueUseEnumValue = No If you set these properties, downstream implementors can extend the enum with more elements. The values of the elements are determined at deployment time and won't be identical across systems. However, the following behavior is ensured: Data … Continue reading AX – D365FFO – Write extensible enums