web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Boolean as an EDT?

(0) ShareShare
ReportReport
Posted on by 3,850

Hi.

Often I create boolean primitive data type if I wan't to determine something in the class or method - then I often declara boolean  ret;

When I use external software who get or set booleans I find it more practical to create EDT as a boolean so the variable can follow the naming conventions and so on. 

In the followed link it is descriped "Extended data types (EDTs) are user-defined types, based on the primitive data types boolean, integer, real, string, and date, and the composite type container. You can also base EDTs on other EDTs." http://msdn.microsoft.com/en-us/library/aa884607.aspx

But when I want to create EDT in the AOT I can't find the option Boolean.

I think it's also logical that you can't create EDT as a boolean because you can't modify the type - it's always true or false, but sometime I want to follow naming conventions so creating boolean as an EDT is a huge benefit for me sometime.

Is it possible to create boolean as EDT, and if so - how? Is it part og Enum?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Rob Hensley Profile Picture
    on at

    Create your EDT as an Enum and make it extend NoYesId.

  • Verified answer
    Community Member Profile Picture
    on at

    For this type of requirement we use NoYesId EDT

    This EDT of type Enum which extends to NoYes Base Enum

    BaseEnum 'NoYes' has two value 'No' and 'Yes' which is equivalent to false and true value of a Boolean variable

    Please verify and let us know if this information is helpful to you.

  • Verified answer
    DG Profile Picture
    1,226 on at

    You need to base your EDT on an enumerator. Make sure that the enumerator has only two elements with integer values 0 and 1. This will make sure that conversion to Boolean is easy. One such example in AX is 'NoYesId' EDT which is based on 'NoYes' enumerator. You can use this as a Boolean EDT. Alternatively extend NoYesId EDT.

    Of course, you cannot change its values (true/false or yes/no), but you can change its labels, help texts, default appearance (drop-down / radio button) etc.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans