Options

Options being exposed incorrectly via a page web service

DakkonDakkon Member Posts: 192
edited 2011-12-07 in NAV Three Tier
I'm running into an issue where I have exposed a page as a web service, where one of the fields is an option, and Navision creates an incorrect enumeration on the service side to represent the option. Specifically I have an option in Navision with the options ' ,Component,Labor'. So I have a blank option as the first choice (yes technically space), that is the usual for many options in Navision. However, the web services layer is exposing this as an enum without the first option, which as far as I can tell makes it impossible for me to explicitly set the field in a record to the blank value. This seems very odd to me that they would strip off the first option when representing it as an enum and even odder that on top of that, they don't bother to explicitly start the enum at 1 since they stripped the zero value. I mean I realize the enum is only used with the service layer so technically the starting int value doesn't matter, but it seems like good practice to be consistent, and even better practice to not going editing the values that are being exposed. :shock:
Has anyone else encountered this crazy behavior? I suspect I will end up rebuilding my service layer to use codeunits and xmlports to avoid this broken behavior. Though sadly the xmlports seem to expose options as a string value rather than an enum, which is just a slight annoyance.
Thad Ryker
I traded my sanity for a railgun :mrgreen:
Sign In or Register to comment.