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)

Enum Value of Integers through BizTalk

(0) ShareShare
ReportReport
Posted on by 700

Hi community,

i have a scenario where a bizTalk Server sends to AX 4.0 Payment terms. These are monthly, quarterly and yearly and are expressed as numbers 1,3,12.

For that purpose I created a Base Enum field in AX that has values 1,3, and 12.My doubt is that BizTalk works with integers, AX works with strings in the Base Enum. Will this import work? Or should I skip the validation and just use an integer field?

I myself dont have a possibility to test the import on clients systems.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    239,632 Most Valuable Professional on at

    Actually, enums are numbers under the hood; element names are just for convenience. If you look how they're stored in database, you'll see integer fields. You even can assign number values to enum variables without any conversion, such as NoYes x = 1.

  • OrangeRocks Profile Picture
    700 on at

    Great, thanks. i wrote a job and wrote the values into this field. It is actually different than I imagined. Only indexes are adressed, not the string values.

    So my enum looks like this:

    index ---  (string)value --- Comments

    0        ---  0                       (empty value)

    1        ---  1                       (monthly)

    2        ---  3                       (quarterly)

    3        ---  12                     (yearly)

    So if the biztalk sends me a number 3 (quarterly), then i get in AX the index 3 with the value 12 (yearly)!

    I altered the structure of my enum:

    index ---  (string)value

    0        ---  0

    1        ---  1

    3        ---  3

    12      ---  12

    Now it should work, although it is not elegant.

  • Suggested answer
    Martin Dráb Profile Picture
    239,632 Most Valuable Professional on at

    Change UseEnumValues property to Yes. Then it should work as you expected.

  • Suggested answer
    Martin Dráb Profile Picture
    239,632 Most Valuable Professional on at

    Well, now I look at it, you must mean something else, because your table contains "(string)value", but the value of enum elements is integer, not string, and the index in your second table isn't actually an index.

    Don't you mean the Value instead of Index and Name instead of Value? If so, you should have Value = 3 and Name = Quarterly, plus an appropriate label.

  • OrangeRocks Profile Picture
    700 on at

    Hi Martin,

    thats unforunately not what the client wants. They do want to see in AX in sales line form only 1,3, or 12.

    "but the value of enum elements is integer, not string" - Thats is correct.  I am sorry - I was not accurate with the definitions here.

    I copy to the forum the properties from the BaseEnum:

    Name         --- Label -- Configuration Key -- EnumValue

    Monthly            "1"                       -                  1

    Quarterly           "3"                       -                  3

    Yearly               "12"                       -                12

    Me solution was to put 1,3,12 in the EnumValue and not 0,1,2 as standard.

  • Verified answer
    Martin Dráb Profile Picture
    239,632 Most Valuable Professional on at

    No problem, they can put anything they like as Label; it makes no difference to functionality.

    Now please close the thread by verifying the answer (using Did this answer your question > Yes beside helpful replies).

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 April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 24

#2
Michel ROY Profile Picture

Michel ROY 14

#3
Jagadabi Profile Picture

Jagadabi 6

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans