Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Extending Microsoft Dynamics NAV 2016 Cookbook

You're reading from   Extending Microsoft Dynamics NAV 2016 Cookbook Extend Dynamics NAV 2016 to win the business world

Arrow left icon
Product type Paperback
Published in Jan 2017
Publisher Packt
ISBN-13 9781786460608
Length 458 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Alexander Drogin Alexander Drogin
Author Profile Icon Alexander Drogin
Alexander Drogin
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Writing Basic C/AL Code FREE CHAPTER 2. Advanced C/AL Development 3. Reporting and Data Analysis 4. .NET Interoperability in C/AL 5. Extending C/AL with COM Components 6. SharePoint Integration 7. Control Add-ins 8. Web Services 9. Events and Extension Packages 10. PowerShell

Exposing and consuming OData web services


The SOAP protocol serves well when you need a standardized interface for an object's methods. If you need to read and update table data, the OData (Open Data) protocol can be a better alternative. It is especially efficient in providing APIs that are open for querying.

NAV Page and Query objects can be published as OData services, providing access to underlying table data to consuming applications.

How to do it...

Now we will publish a page object as an OData web service and read the records from an external application in C#.

  1. Start the NAV client and open the page Web Services from Departments | Administration | IT Administration | Services.

  2. Click New to create a web service. Select Page in the Object Type field, then choose the page 7012 Purchase Prices in the Object ID field.

  3. Assign a name to the web service to identify it. In the field Service Name, enter the name PurchasePrice.

  4. Set the checkmark in the field Published. This will publish the web service...

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 €18.99/month. Cancel anytime