AIF inbound sales order-- enum not translating properly

Hello,

We are importing Sales orders using AIF file adapter.

One of the fields in one of the tables is CardType, an enum (CreditCardType) with values for 0, 1, 2, and 3. The field is enabled and required in the data policy. We are passing the correct value (AmericanExpress) in the XML. The sales order is getting created. But the field always defaults to 0 (Visa).

This is standard AX functionality. The enumerated values should get translated automatically to the corresponding integer values.

I’ve tried to break on ax.parmCardType and the debugger never stops there.

Any suggestions?

Thank you.

I found the answer myself by debugging.

The field CardType was marked AllowEditOnCreate = “No” in the table’s field properties. Changed it to Yes and enum translation worked perfectly.