Book Image

Building ERP Solutions with Microsoft Dynamics NAV

By : Stefano Demiliani
Book Image

Building ERP Solutions with Microsoft Dynamics NAV

By: Stefano Demiliani

Overview of this book

Implementing Microsoft Dynamics NAV in the real world often requires you to integrate the ERP with external applications or solve complex architectural tasks in order to have a final successful project. This book will show you how to extend a Microsoft Dynamics NAV installation to the enterprise world in a practical way. The book starts with an introduction to Microsoft Dynamics NAV architecture and then moves on to advanced topics related to implementing real-world solutions based on NAV and external applications. You will learn how an enterprise distributed architecture with NAV at the core can be implemented. Through a series of real-world cases on every topic and every industry (sales, retail, manufacturing, distribution, healthcare, and so on), you’ll see step by step how to efficiently solve a technical problem. These common problems encountered in a NAV implementation will be solved using the entire technology stack that Microsoft offers. By the end of the book, you will have the knowledge to efficiently solve certain scenarios, you will know which is the best solution architecture to propose to a customer and how to implement it.
Table of Contents (17 chapters)
Building ERP Solutions with Microsoft Dynamics NAV
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

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 = 
    ...