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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

how to get field Name from fieldNum?

(0) ShareShare
ReportReport
Posted on by 932

Hello,

I have this tabel that contains TableNum and fienNum :  

pastedimage1683540397142v1.png

I want to get the field Name But I don't which table that contains the fieldId and the fieldName

Have you any idea how to get the field name?

Thanks

I have the same question (0)
  • Suggested answer
    Mohit Rampal Profile Picture
    12,565 Moderator on at

    Hi, You can use global function FieldId2Name. Please check this article

    yasirnedian.blogspot.com/

  • Suggested answer
    Abhi Profile Picture
    120 on at

    Hi BASMA,

    can you check the SQLDICTIONARY table, TABLEFIELDIDTABLE table and TABLEIDTABLE table in SSMS.

    Thanks,

  • Suggested answer
    GirishS Profile Picture
    27,827 Moderator on at

    Hi Basma,

    In addition to the above suggestions, you can check the below blog also.

    https://d365technext.blogspot.com/2018/07/get-field-label-type-and-name-using-x.html

    Thanks,

    Girish S.

  • BASMA Profile Picture
    932 on at

    thanks for reply , 

    I find the tableNum but the fieldNum isn't the same in the 2 tables how can I add the relation   : 

    pastedimage1683542745292v1.png

    select * from SQLDICTIONARY where SQLDICTIONARY.TABLEID='8246'

    pastedimage1683542795667v2.png

  • BASMA Profile Picture
    932 on at

    the problem is I haven't the name of field to use FieldId2Name

    I have only the fieldLabel fieldNume  and the name of table

  • GirishS Profile Picture
    27,827 Moderator on at

    Dont compare FieldId with FieldNum in your table. Use Name and SQLName field as relation and check.

    I mean YourTableName.FieldLabel == SqlDictionary.Name.

    Thanks,

    Girish S.

  • BASMA Profile Picture
    932 on at

    it doesn't the same : fieldLabel and Name

    pastedimage1683543296332v1.png

    pastedimage1683543322386v2.png

  • Mohit Rampal Profile Picture
    12,565 Moderator on at

    May I know how you are populating data in your custom table.

    Also regarding this your below comment, I think you don't need Name field as you already have tableId and fieldNum. You can try creating a Display method for 'Name' in your custom table instea dof field.

    'the problem is I haven't the name of field to use FieldId2Name

    I have only the fieldLabel fieldNume  and the name of table'

  • GirishS Profile Picture
    27,827 Moderator on at

    In that case you need to use DictTable class to get the table related details.

    https://community.dynamics.com/365/financeandoperations/b/dynamicsofax/posts/read-properties-of-table-fields-using-x-code

    Other option will be inserting the field name instead of field label in your custom table.

    Thanks,

    Girish S.

  • BASMA Profile Picture
    932 on at

    i select table, then I select field associated to this table : 

    pastedimage1683543677011v1.png

    l

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 551 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans