Developer forum

Forum » Integration » OData provider doesn't return the expected data

OData provider doesn't return the expected data

Michael Knudsen
Reply

I'm using the OData provider on a DW9.17.7 solution to get prices from the Business Central web service (DynamicwebSalesPrices3), but I'm not getting the expected prices. I have followed the configuration from https://doc.dynamicweb.dev/manual/tutorials/integration/blueprints/bc-odata-v4-blueprint.html#business-central-v4-entities---imports

I would like to have prices with Sales_Type = 'Customer' or 'Customer Price Group'. It returns only prices with Sales_Type = 'Customer' when I add the OData $filter, but I'm able to get the prices with Sales_Type = 'Customer Price Group', if I change the $filter to only Sales_Type = 'Customer Price Group'.
 

On the DW endpoint have I added a $filter=(Sales_Type eq 'Customer') or (Sales_Type eq 'Customer Price Group') 

When the import jobs runs, is it a bit strange that the URL encoding seems to change between the first API call and the next API call. Eg. is space encoded "+" in the first call, while the next is space encoded "%20". It might not have anything to do with the missing prices, but maybe it has?
Starting reading data from endpoint: ... $filter=(Sales_Type+eq+%27Customer%27)+or+(Sales_Type+eq+%27Customer+Price+Group%27)'

Later the pagination request seems to change encoding:
Paginating request to endpoint: ... $filter=%28Sales_Type%20eq%20%27Customer%27%29%20or%20%28Sales_Type%20eq%20%27Customer%20Price%20Group%27%29&aid=FIN&$skiptoken=40931a09-b5ab-ee11-be36-6045bd879ede'

Br. Michael Knudsen


Replies

 
Rasmus Sanggaard Dynamicweb Employee
Rasmus Sanggaard
Reply

Hi, 

 

The endpoint does not allow for 'or' statement on Sales_type. It seems to be becasuse the pages has a filtered dropdown in Business Central. 

This is also way we specify in the Blueprint to make one activity for each Sales_Type. 

 

BR Rasmus Sanggaard

 

 

You must be logged in to post in the forum