NAV2013 WebService OData Query - Querying FlowFilter(?)

agomes_17
Member Posts: 9
Hi there,
I Created a Query Object in new NAV2013 Beta and published it in a web service, like this:
After I publish the Query I can querying like this:
"http://localhost:7048/DynamicsNAV70/OData/Customer" (Example)
and i get the response:
Querying this is easy, My problem is when I try to get a response by applying flowfilter, like this
"http://localhost:7048/DynamicsNAV70/OData/Customer?$filter=No eq '10000'&?$Date_filter_FilterOnly eq datetime '2013-12-31'
(Get the value of Debit Amount in that date)
the response is return with the value of the field without the filter.
Example :
-> return "312529,67" when i expected "291976,4"
Can someone help me?
Sorry for my bad English.
I Created a Query Object in new NAV2013 Beta and published it in a web service, like this:
After I publish the Query I can querying like this:
"http://localhost:7048/DynamicsNAV70/OData/Customer" (Example)
and i get the response:
Querying this is easy, My problem is when I try to get a response by applying flowfilter, like this
"http://localhost:7048/DynamicsNAV70/OData/Customer?$filter=No eq '10000'&?$Date_filter_FilterOnly eq datetime '2013-12-31'
(Get the value of Debit Amount in that date)
the response is return with the value of the field without the filter.
Example :
-> return "312529,67" when i expected "291976,4"
Can someone help me?
Sorry for my bad English.
0
Comments
-
I have tried to apply flow filters to Page OData, they are working. On Query, there is some problem, not working for me. There is another difference - on the page, the Date_Filter is of type String, on Query, it is of type DateTime.0
-
hey, yes in a query the date_filter is datetime, i see in MSDN in that case do "......datetime '2013-12-31' but still doens't work
It's like the filter is never applied.0 -
Have you tried to open the query directly in RTC? Is the result correct?0
-
Yes i tried that, open the query in RTC and show the result correct, and if i apply the filter manually, the result is filter correctly, but through query in browser doens't and that is what i need.
EDIT
i tried create a page of some fields of Customer table, and expose the through a webservice, but when i query in browser like this
http://localhost:7048/DynamicsNAV70/ODa ... es('10000')?$filter=Date_Filter eq datetime'2013-12-31'
its return "<message>The filter "='31-12-2013 00:00:00'" is not valid for the Date Filter field on the Customer table. '31-12-2013 00:00:00' is not a valid date.</message> "
could be the same problem?0 -
As I wrote, on page the field is of type String. you need to enter the filter "as in NAV client". It means something like eq '311213' ' or '12/31/13' if it is locale dependant...0
-
OK but i do that just for testing, what i realy need is using a query object.
I already tried create another field for "Name" for example, and quering in browser and the result return correct, just in "Date_Filter" doesn't work, i think is because is datetime like you said0 -
Hi there,
Just a little update, i have success exposing a page web service and querying it through browser and using flowfilter "date_filter".
With object "query" still doesn't workas an alternative i'm querying directly the fields of which i want the value, but is not the best solution.
anyone know other possible solution ?
TY0 -
like wait for the release? :-) Do not forget, this is beta, there could be some problems and it is needed to report them to have perfect release... :-)0
-
yes of course
but I'm working on a prototype that will use this technology and wondered if it was possible, but looks like for now it's not
Thanks0 -
As I wrote, on page the field is of type String. you need to enter the filter "as in NAV client". It means something like eq '311213' ' or '12/31/13' if it is locale dependant...
Hi Kamil, currently I'm using NAV 2017 odata feed and Date Filter (flow filter) doeas not work.
My link is
http://localhost:7048/NAV100B16177/ODataV4/Company('CRONUS BELGIË NV')/ChartOfAccounts?$Date_Filter eq 010118 (Page 634 is published)
Could you please advise how to make it works?
Thank you in advance0 -
Finally, I found working cases (16, 38 pages were exposed as web services):
For FlowFilter field link should be:
http://localhost:7048/DynamicsNAV100/OData/Company('CRONUS BELGIË NV')/GLAccountList?$filter=Date_Filter eq '210118'
where 210118 means 21 Jan 2018
For Normal field link should be :
http://localhost:7048/DynamicsNAV100/OData/Company('CRONUS BELGIË NV')/ItemLedgerEntries?$filter=Posting_Date eq 2018-01-21T00:00:00Z (Date in UTC timezone!)
Hope it will help.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions