Search code examples
dynamics-ax-2012dynamics-ax7

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


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


Solution

  • 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;