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, ...
Answered

How to get AOT object view properties data field?

(0) ShareShare
ReportReport
Posted on by 152

Hello,

I need to get the Data Field of AOT View properties.

I tried the methods of DictView class. But It doesn't work.

For example, like as follow.

DataFieldView.png

I tried the methods of DictView class. But It doesn't work.

How can I get the Data Field properties of view?

Could you give me some advises?

Thanks.

I have the same question (0)
  • Suggested answer
    GirishS Profile Picture
    27,827 Moderator on at

    Hi Akshi,

    Check the below blog and see if it suits your scenario.

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

    Thanks,

    Girish S.

  • akshi Profile Picture
    152 on at

    Hi Girish,

    Thanks for your info.

    But, my scenario would like to get AOT View's properties like the above image.

    I confirmed that the DictField class can get table properties, but I can't find out from that class that Data Field properties of AOT View.

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

    Try the below code and check if it works.

    SysDictTable    dictTable = new SysDictTable(tableNum(Assetbasis));
    SysDictField    dictField;
    TreeNode        treeNode;
    FieldId         fieldId = dictTable.fieldNext(0);
    
    while (fieldId)
    {
        dictField = dictTable.fieldObject(fieldId);
    
        if (dictField.isSql() && !dictField.isSystem())
        {
            treeNode = dictField.treeNode();
            info(strFmt("%1",
                treeNode.AOTgetProperty("DataField")));
        }
    
        fieldId = dictTable.fieldNext(fieldId);
    }

    Thanks,

    Girish S.

  • akshi Profile Picture
    152 on at

    Hi Girish,

    I got the knowledge that I can get the AOT object with the TreeNode method of SysDictField. I had a hard time getting an object for AOT.

    It was helpful. Many thanks :)

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 544 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans