Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Suggested answer

Different names of fields

Posted on by 1,445

Hi,

In AX, the there is a standard field CreditCardAddressVerificationVoid from the CustTable.

Why does it have the name CREDITCARDADDRESSVERIFICATI292 in SQL?

  • Suggested answer
    ergun sahin Profile Picture
    ergun sahin 8,812 Super User on at
    RE: Different names of fields

    I looked when I had time. I also have this name in sqlDictonary. I do not have the opportunity to look directly from SQL, but I think your field name is different from mine at SQL.

    By the way, you can also look at the field Names from SqlDictionary.

    AOT/System Documentation/Tables/SqlDictionary/Right Click/Addins/Table browser/SqlName field

  • Mandeep.SJS Profile Picture
    Mandeep.SJS 133 on at
  • Suggested answer
    ergun sahin Profile Picture
    ergun sahin 8,812 Super User on at
    RE: Different names of fields

    info( new DictField(tableNum(CustTable),FieldNum(CustTable,CreditCardAddressVerificationVoid)).name(DbBackend::Sql));

    I was hoping to get it this way but I tested it and it was not like you show us. What is in SqlDictionary?
    I will look at this subject again during the day.

  • Mandeep.SJS Profile Picture
    Mandeep.SJS 133 on at
    RE: Different names of fields

    You could write a function to query the AOT using .fieldObject(dictionary table) and then extract info from this object like field name, basetype and label.

  • DJRM Profile Picture
    DJRM 1,445 on at
    RE: Different names of fields

    Is there a way to get the SQL-equivalent name of a table field in AOT? I tried using SysDictField and even treenode appraoach but no luck.

    I need to know the SQL name because I am querying a DB using ODBC in X++ and if I do select CreditCardAddressVerificationVoid from CustTable, ODBC throws an "invalid column name" exception.

  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 225,526 Super User on at
    RE: Different names of fields

    That object names in database don't match object names in AOT isn't uncommon. Some AX field names are reserved words in SQL, some are shortened (which is your case) and so on.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,835 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,526 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans