Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Lookup to display all existing EDT's

(0) ShareShare
ReportReport
Posted on by 780

Hi All,

I have to create two lookup's that will display all the EDT's and BaseEnum's in D365. I have gone through the SysModelElement table, but there is no data in this table. In AX2012, there is one EDT SysXppType for the same. But this does not exist in D365. Is there anyone has any idea about this how we can achieve this.

Thanks in Advance

Naveen Singh

*This post is locked for comments

  • Ashraf Shorman Profile Picture
    Ashraf Shorman 100 on at
    RE: Lookup to display all existing EDT's

    This is a sample code,

    public void PerformExtendedTypeLookup(FormControl _Control)

    {

       Query                   query          = new Query();

       QueryBuildDataSource    queryBuildDataSource;

       QueryBuildRange         queryBuildRange;

       SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(UtilElements), _Control);  

       sysTableLookup.addLookupField(fieldNum(UtilElements, Name), true);

       sysTableLookup.addLookupField(fieldNum(UtilElements, RecordType));

       queryBuildDataSource = query.addDataSource(tableNum(UtilElements));

       queryBuildRange = queryBuildDataSource.addRange(fieldNum(UtilElements, RecordType));

       queryBuildRange.value(strFmt('%1',UtilElementType::ExtendedType));

       sysTableLookup.parmQuery(query);

       sysTableLookup.performFormLookup();

    }

  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    RE: Lookup to display all existing EDT's

    Use MetadataSupport::EdtNames() and MetadataSupport::EnumNames().

  • naveen singh Profile Picture
    naveen singh 780 on at
    RE: Lookup to display all existing EDT's in D365 for operation

    Hi Martin,

    Thank you fir your help. 

    The post is regarding to display the form control node name. Can you please let me know how we can do this for BaseEnum and EDT's.

    Regards,

    Naveen

  • Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    RE: Lookup to display all existing EDT's in D365 for operation

    You should be able to get this list from the new metadata API. Then simply put it into a temporary table and use the table for your lookup. Note that the list will be pretty long.

    There aren't model tables because application objects aren't stored in database anymore. There is TypeIdTable, but I don't think is exposed in any way. It's used internally by AX kernel to store the mapping between names and IDs.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans