Skip to main content

NAV 2013 & NAV 2013 R2 - How to - Using FlowFilters in OData URIs.

Hi all,

In Previous post related to ODATA we saw how to publish and consume a Odata Web Services from NAV 2013 & 2013 R2.

For Articles Related to ODATA & web services posted before today please Refer Label Web Services.

Today we will see how to Using FlowFilters in OData URIs.



The Example shown below is from NAV 2013 R2 and using a Page web Service. The Steps remain same for Query Web Services and in NAV 2013.

In this procedure, we will create and publish a web service from the Item Card page in Microsoft Dynamics NAV and then query the data in that web service by using a FlowFilter.

How to Publish a Web Service?

The Service Should of Type Page with ID 30 and Web Service Name as MyItems.



Now Let's Check the Metdata of the Created Service (As discussed in earlier Post).

http://<Server>:<WebServicePort>/<ServerInstance>/OData/$metadata

In My Case the URL is -

http://INDEL-SXD6995NB.TecturaCorp.net:6514/PersonalDB/OData/Company('CRONUS%20International%20Ltd.')/MyItems

http://localhost:6514/PersonalDB/OData/$metadata

Below is the ScreenShot of My Page WebService Metadata.



Navigate to End of the Browser Page, you will find that end in the word Filter, as shown below.



Create a URI that returns information for a single item card. For example:

http://localhost:6514/PersonalDB/OData/Company('CRONUS%20International%20Ltd.')/MyItems('1906-S')

And Output is Something Like as shown below. Just Check Value of Qty_on_Sales_Order.



Apply a FlowFilter to that item and specify GREEN as the value for the Location_Filter:

http://localhost:6514/PersonalDB/OData/Company('CRONUS%20International%20Ltd.')/MyItems('1906-S')?$filter=Location_Filter eq 'GREEN'

And Output is Something Like as shown below. Just Check Value of Qty_on_Sales_Order.



For Just for Verification Purpose Let's Check same Item In Navision.



That Completes the task of this post. In Next Post we will see something more about ODATA.

Regards,
Saurav Dhyani
www.sauravdhyani.com

Comments

Popular posts from this blog

VIEW SERVER STATE permission on SQL Server?

Hi all, Sometime While trying to Login into a database we face an error message as shown below. --------------------------- Microsoft Dynamics NAV Classic --------------------------- You cannot start Microsoft Dynamics NAV Classic because you do not have the VIEW SERVER STATE permission on SQL Server. Contact your system administrator. --------------------------- OK    ---------------------------

RTC Report It is not possible to instantiate the Visual Studio bridge.

Hi all, As a Navision developers I have Multiple Versions of Navision running in single Machine. As discussed Earlier in the post how to run multiple Version of RTC in single machine. So my machine have following details for RTC Versions - NAV 2009 R2    - is installed. NAV 2009 SP1  - is copied at C:\Program Files (x86)\Microsoft Dynamics NAV\60\NAV 6.0 SP1 IN\ NAV 2009         - is copied at C:\Program Files (x86)\Microsoft Dynamics NAV\60\NAV 6.0 IN\ This approach has been working great for execution of Classic and RTC Clients. However, after installing Dynamics NAV 2009 R2, if i tried to view the Layout for an NAV 2009 SP1 Report i was getting the following error: ---------------------------  Microsoft Dynamics NAV Classic  ---------------------------  It is not possible to instantiate  the Visual Studio bridge.  ---------------------------  OK    --------------------------- After searching for the error i figured out the issue was due to - Design change in NA

NAV 2013 R2 - Cumulative update 12 Released.

Hi all, Please find below the details of  Cumulative Update 12 released for Microsoft Dynamics NAV 2013 R2. Title - Cumulative Update 12 for Microsoft Dynamics NAV 2013 R2 Build No. - 38053 Release Date - October, 2014 Local Version Included - AU, AT, BE, CH, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, SE, UK, RU Download Link Note: Implementing this cumulative update will require a database conversion unless you have already implemented update rollup 5.