Adding a FlowFilter field to a page web service definitely causes an error. I have a support incident open with Microsoft on this specific topic and so far there's not be much in the way of a response.
I have discovered that you can create an extension codeunit that extends the page web service where you can pass in the value of the flowfilter and then the codeunit can set the filter, calculate the flowfield, and pass the result back.
Me to integrate the Navision web service with share point web portal for dealer.
While using the Item list page (to get the inventory by location) web service and add the Location filter in page it gives error. Web page give error.
While use the extension using codeunit web service. Web page become too slow.
I know that it has been a lot of time since the first post, but we just have faced the problem and found the solution, may be it could help someone else too.
In the OnAfterGetRecord code of the published page:
Yes, sorry, I noticed it after I summit the answer. At this point we have no need to pass the location as a parameter because we work actually with only one location, I mean, we have more than one but we only ship our deliveries from this one, so..
But I pretty sure that we going to face this problem soon, so I keep working in a solution and I found a ugly one, but it works.
If you pass the filter "Base Unit of Measure" (for instance )= '<>Location_value', this filter has none effect and in the OnAfterGetRecord code section:
LOCATION VALUE = GETFILTER(COPYSTR("Base Unit of Measure", 3, 10);
Comments
I have discovered that you can create an extension codeunit that extends the page web service where you can pass in the value of the flowfilter and then the codeunit can set the filter, calculate the flowfield, and pass the result back.
While using the Item list page (to get the inventory by location) web service and add the Location filter in page it gives error. Web page give error.
While use the extension using codeunit web service. Web page become too slow.
In the OnAfterGetRecord code of the published page:
SETRANGE("Location Filter", 'LOCATION_VALUE');
Not need of extension codeunit at all.
Hope it helps.
Airatx.
But I pretty sure that we going to face this problem soon, so I keep working in a solution and I found a ugly one, but it works.
If you pass the filter "Base Unit of Measure" (for instance )= '<>Location_value', this filter has none effect and in the OnAfterGetRecord code section:
LOCATION VALUE = GETFILTER(COPYSTR("Base Unit of Measure", 3, 10);
Again sorry for my rash answer. :oops:
Airatx