Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Answered

How to iterate the fileds in FiledGroup of a table

(0) ShareShare
ReportReport
Posted on by 120 User Group Leader

I need to the fields available in particular table and particular fieldGroup, Please advice

  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 230,379 Most Valuable Professional on at
    RE: How to iterate the fileds in FiledGroup of a table

    If you want the same code for AX 2012 and F&O, then you can't use the new metadata API in F&O. But you can use SysDictFieldGroup, because that exists in both versions.

    For example:

    TableId tableId = tableNum(MyTable);
    SysDictFieldGroup dictFieldGroup = new SysDictFieldGroup(tableId, tableFieldGroupStr(MyTable, MyGroup));
    FieldName fieldName;
    int i;
    
    for (i = 1 ; i <= dictFieldGroup.numberOfFields(); i  )
    {
    	fieldName = fieldId2name(tableId, dictFieldGroup.field(i)));
    	info(fieldName);
    }

  • Alfasith AX Profile Picture
    Alfasith AX 120 User Group Leader on at
    RE: How to iterate the fileds in FiledGroup of a table

    Both R3 and D365 please

  • Martin Dráb Profile Picture
    Martin Dráb 230,379 Most Valuable Professional on at
    RE: How to iterate the fileds in FiledGroup of a table

    In which version of AX?

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,661 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,379 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans