Hi,
In AX, the there is a standard field CreditCardAddressVerificationVoid from the CustTable.
Why does it have the name CREDITCARDADDRESSVERIFICATI292 in SQL?
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.
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.
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.
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.
You can look it up here...
community.dynamics.com/.../finding-table-and-field-information-in-microsoft-dynamics-ax-2012
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
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
André Arnaud de Cal... 724 Super User 2025 Season 2
Martin Dráb 580 Most Valuable Professional
CA Neeraj Kumar 554