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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Accessing SubPage data with OData V4

(0) ShareShare
ReportReport
Posted on by 47

Hi, I have a Page and SubPage I want to publish as a web service but I can't access the SubPage data with OData V4,

I can do it using OData (Not V4) using both Containments and Associations https://docs.microsoft.com/en-us/dynamics-nav/using-containments-and-associations

I would prefer using V4 and Json if it's possible, does anyone know if it is?

*This post is locked for comments

I have the same question (0)
  • Vignir Einarsson Profile Picture
    47 on at

    I can get the results in Json format by using associations and adding ?$format=json  to my OData URL but would still prefer OData V4  if it's possible

  • Verified answer
    Andrey Baludin Profile Picture
    3,941 on at

    Do not use web services in this case.

    Change the pages type to API.

    You can look at pages 5475 and 5476 as example.

    More about APIs you can read here:

    community.dynamics.com/.../how-to-obtain-data-from-nav-standard-apis

    and here:

    community.dynamics.com/.../how-to-create-custom-apis-for-business-central-even-from-macos

  • Vignir Einarsson Profile Picture
    47 on at

    Thanks Andrey, the API works like a charm. Very cool feature.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans