Danjo's two cents NAV, Powershell, Android, C#, Lync, Win8, …

23Oct/120

NAV2013 – How to access OData

Did you already try out the new possibilities of OData coming with Microsoft Dynamics NAV 2013?

Here is a quick summary of what you can do when accessing OData webservice.

All examples can be done with default installation of Cronus and publishing Page 22 as a webservice with the name Customer.

 

Show all OData-feeds:

http://localhost:7048/DynamicsNAV70/odata

Show Metadata:

http://localhost:7048/DynamicsNAV70/odata/$metadata

Show all customers:

http://localhost:7048/DynamicsNAV70/odata/Customer

Show customer with the primary key 10000 (using key):

http://localhost:7048/DynamicsNAV70/odata/Customer('10000')

Show all customers with Location Code BLUE (using field-filter):

http://localhost:7048/DynamicsNAV70/odata/Customer?$filter=Location_Code eq 'BLUE'

Show Name, Location Code and Credit Limit (LCY) from customers (selecting a couple of fields only):

http://localhost:7048/DynamicsNAV70/odata/Customer?$select=Name, Location_Code, Credit_Limit_LCY

Show Name, Location Cod and Credit Limit (LCY) for customers with Location Code BLUE (selection and filter):

http://localhost:7048/DynamicsNAV70/odata/Customer?$filter=Location_Code eq 'BLUE' &$select=Name, Location_Code, Credit_Limit_LCY

The following two tabs change content below.
Danjo

Danjo

Technical Engineer at TSO-DATA Nürnberg GmbH
Daniel is working as a developer for Microsoft Dynamics NAV since 2007.
Comments (0) Trackbacks (0)

No comments yet.


Leave a Reply

Trackbacks are disabled.

%d bloggers like this: