How to query entity from Dynamics AX with X++?

1.5k Views Asked by At

I cannot find any way to query data from Dynamics AX (Finance and Operations). And I searched everywhere with google, they all talked about how to query table but not the entity. Anyone who knows how to do it? If I want to read the data from AccountantEntity, how should I do in X++?

Thanks, Tilerphy

1

There are 1 best solutions below

0
Matej On BEST ANSWER

Entity refers to DataEntityView. They are in AOT - Data Model - Data Entities.

In the X++ you can refer to AccountantEntity as any other table/view (your model must have reference to Application Suite where entity is defined):

AccountantEntity accountantEntity;
select firstOnly * from accountantEntity;