Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Building ERP Solutions with Microsoft Dynamics NAV

You're reading from  Building ERP Solutions with Microsoft Dynamics NAV

Product type Book
Published in Mar 2017
Publisher Packt
ISBN-13 9781787123083
Pages 392 pages
Edition 1st Edition
Languages
Author (1):
Stefano Demiliani Stefano Demiliani
Profile icon Stefano Demiliani
Toc

Table of Contents (17) Chapters close

Building ERP Solutions with Microsoft Dynamics NAV
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
1. Introduction to Microsoft Dynamics NAV Architectures 2. Configuring Microsoft Dynamics NAV Web Services 3. Creating an Application Using NAV Web Services 4. Using NAV Web Services with Microsoft Power BI 5. Integrating NAV Web Services and External Applications 6. Extending NAV Pages with Control Add-ins 7. Programming Universal Windows Apps with NAV and Devices 8. Exploring Microsoft Azure and its Services 9. Working with NAV and Azure App Service 10. Implementing a Message-Based Architecture with Azure Service Bus and NAV

Using an OData web service


As you previously learned, a page web service has also an OData URL.

Let's learn how to use OData web service by performing the following steps:

  1. To use an OData web service, we need to reference it in our Visual Studio by going to the project name in Solution Explorer, right-clicking on it, and navigating to Add | Service Reference…:

  2. In the Add Service Reference window, add the OData service URL at  http://servername:port/NAVInstance/OData/.

  3. servername is the name (or IP address) of your NAV server, port is the OData web service port, and NAVInstance is the name of your NAV instance.

  4. In this sample, our service URL is http://VMEID31:7048/DynamicsNAV90/OData/.

  5. Give a friendly namespace for the service (in this sample, we use NAVODATA):

  6. Now you can use the ODATA service in your application. First, add a reference to:

            using System.Data.Services.Client; 
    
  7. Then set the ODATA service URL by reading it from your app.config file:

            string serviceUri = 
    ...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}