this piece of code can be used for get the data sources involve in making the data entity. Microsoft.Dynamics.AX.Metadata.MetaModel.AxDataEntityView axDataEntity = Microsoft.Dynamics.Ax.Xpp.MetadataSupport::GetDataEntityView("CustCustomerEntity"); Microsoft.Dynamics.AX.Metadata.MetaModel.AxQuerySimple query = axDataEntity.ViewMetadata; var dataSources = query.DataSources; System.Collections.IEnumerator dataSourcesEnumerator = dataSources.GetEnumerator(); while (dataSourcesEnumerator.moveNext()) { Microsoft.Dynamics.AX.Metadata.MetaModel.AxQuerySimpleDataSource dataSource = dataSourcesEnumerator.get_Current(); }
Get metadata, data sources of a data entity D365FO
This was originally posted here.
*This post is locked for comments