mibuso.com

Microsoft Business Solutions online community
It is currently Sat Oct 25, 2014 7:27 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: NAV2013 WebService OData Query - Querying FlowFilter(?)
PostPosted: Tue May 22, 2012 5:22 pm 
Offline

Joined: Fri Mar 09, 2012 6:06 pm
Posts: 7
Country: Portugal (pt)
Hi there,

I Created a Query Object in new NAV2013 Beta and published it in a web service, like this:

Attachment:
query.jpg
query.jpg [ 54.24 KiB | Viewed 2152 times ]


After I publish the Query I can querying like this:

"http://localhost:7048/DynamicsNAV70/OData/Customer" (Example)

and i get the response:

Attachment:
response.jpg
response.jpg [ 134.75 KiB | Viewed 2152 times ]


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.


Top
 Profile E-mail  
 
 Post subject: Re: NAV2013 WebService OData Query - Querying FlowFilter(?)
PostPosted: Tue May 22, 2012 9:23 pm 
Offline
MVP Microsoft Dynamics NAV
NAV TechDays 2014 attendee

Joined: Thu Oct 16, 2003 8:50 am
Posts: 12441
Location: Brno
Country: Czech Republic (cz)
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.

_________________
Kamil Sacek
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.


Top
 Profile E-mail WWW  
 
 Post subject: Re: NAV2013 WebService OData Query - Querying FlowFilter(?)
PostPosted: Wed May 23, 2012 10:42 am 
Offline

Joined: Fri Mar 09, 2012 6:06 pm
Posts: 7
Country: Portugal (pt)
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 :s

It's like the filter is never applied.


Top
 Profile E-mail  
 
 Post subject: Re: NAV2013 WebService OData Query - Querying FlowFilter(?)
PostPosted: Wed May 23, 2012 10:48 am 
Offline
MVP Microsoft Dynamics NAV
NAV TechDays 2014 attendee

Joined: Thu Oct 16, 2003 8:50 am
Posts: 12441
Location: Brno
Country: Czech Republic (cz)
Have you tried to open the query directly in RTC? Is the result correct?

_________________
Kamil Sacek
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.


Top
 Profile E-mail WWW  
 
 Post subject: Re: NAV2013 WebService OData Query - Querying FlowFilter(?)
PostPosted: Wed May 23, 2012 11:09 am 
Offline

Joined: Fri Mar 09, 2012 6:06 pm
Posts: 7
Country: Portugal (pt)
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?


Top
 Profile E-mail  
 
 Post subject: Re: NAV2013 WebService OData Query - Querying FlowFilter(?)
PostPosted: Wed May 23, 2012 12:21 pm 
Offline
MVP Microsoft Dynamics NAV
NAV TechDays 2014 attendee

Joined: Thu Oct 16, 2003 8:50 am
Posts: 12441
Location: Brno
Country: Czech Republic (cz)
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...

_________________
Kamil Sacek
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.


Top
 Profile E-mail WWW  
 
 Post subject: Re: NAV2013 WebService OData Query - Querying FlowFilter(?)
PostPosted: Wed May 23, 2012 12:31 pm 
Offline

Joined: Fri Mar 09, 2012 6:06 pm
Posts: 7
Country: Portugal (pt)
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 said


Top
 Profile E-mail  
 
 Post subject: Re: NAV2013 WebService OData Query - Querying FlowFilter(?)
PostPosted: Mon May 28, 2012 3:17 pm 
Offline

Joined: Fri Mar 09, 2012 6:06 pm
Posts: 7
Country: Portugal (pt)
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 work :s as 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 ?

TY


Top
 Profile E-mail  
 
 Post subject: Re: NAV2013 WebService OData Query - Querying FlowFilter(?)
PostPosted: Mon May 28, 2012 3:53 pm 
Offline
MVP Microsoft Dynamics NAV
NAV TechDays 2014 attendee

Joined: Thu Oct 16, 2003 8:50 am
Posts: 12441
Location: Brno
Country: Czech Republic (cz)
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... :-)

_________________
Kamil Sacek
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.


Top
 Profile E-mail WWW  
 
 Post subject: Re: NAV2013 WebService OData Query - Querying FlowFilter(?)
PostPosted: Mon May 28, 2012 4:09 pm 
Offline

Joined: Fri Mar 09, 2012 6:06 pm
Posts: 7
Country: Portugal (pt)
yes of course :D 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

Thanks


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to: