web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Exposing Sales order complete entity through OData

(0) ShareShare
ReportReport
Posted on by 501

Hello everyone,

I want to expose sales order complete entity through OData. By default in AX7 there are more than 1 entities for 1 sales order. e.g
1205.Capture.PNG

Separate sales header and lines etc. But i want to expose it in one entity so that anyone can access sales order in 1 call. We have Composite data entities in AX7 but that are only for Data Management framework.
So is there any way to expose complete sales order entity through OData ?

*This post is locked for comments

I have the same question (0)
  • Mea_ Profile Picture
    60,286 on at

    Hi Shahrukh Naeem,

    If you need to have one entity for lines and header you probably need to create new one, because as you mentioned, out of the box you have 2 separate entities: header and lines.

  • Shahrukh Profile Picture
    501 on at

    Thanks ievgen,

    I have this solution in my mind but if i create a new entity like this.

    SalesHeaderEntity

         -> SalesLineEntity

    Then a Sales header will be able to contain just 1 line in that. how to manage this so that Header and lines will have 1 to many relation ?

  • Mea_ Profile Picture
    60,286 on at

    In standard AX you can find couple of entities that have header and lines, take a look at LedgerJournalEntity for example.

  • Shahrukh Profile Picture
    501 on at

    Thanks Ievgen,

    I have looked this entity and few more, but it didn't fulfill my requirement, i still didn't find how to use 1 to many relation in entities, in my opinion it is not possible by data entities to manage a complete sales order. that's why MS has created composite entities.

  • Mea_ Profile Picture
    60,286 on at

    Please check this thread community.dynamics.com/.../220205, where another community user tried to build entity for vendor pending invoice, it has relations 1:n between header and lines. In the end he succeed with our help, so in my opinion it's totally possible.  

    But you need to tell us what are you doing and what is your issue otherwise we won't be able to help you.

  • Carl A Profile Picture
    5 on at

    Use the $expand keyword in the url.

    https://<AOS>/data/SalesOrderHeaders?$filter=SalesOrderNumber eq '000001'&$expand=SalesOrderLine

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 28

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans