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
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();
}
Use MetadataSupport::EdtNames() and MetadataSupport::EnumNames().
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
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.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,188 Super User 2024 Season 2
Martin Dráb 230,030 Most Valuable Professional
nmaenpaa 101,156