Simple VB.net WebService Example but not working

jwilder
Member Posts: 263
I am trying to get a really simple web service running in vb.net. For some reason as soon as I start using the item table in my code (I tried this with Payment Terms table and I had no problem) I start getting the following error in Visual Studio (returned by the web service):
The Sales (Qty.) for Forecast field in the Item table must be active.
It is true that this field is not enabled but it has nothing to do with the code. Here is the code in my codeunit:
Here is my VB.net code which I think is not the problem:
Anyone run into something similar on a table that has a field that is not enabled?
The Sales (Qty.) for Forecast field in the Item table must be active.
It is true that this field is not enabled but it has nothing to do with the code. Here is the code in my codeunit:
ItemNo = Code20 Parameter ReturnValue is Text50 IF Item.GET(ItemNo) THEN EXIT(Item.Description);
Here is my VB.net code which I think is not the problem:
Dim MyService As New NAVWebservice.ItemCodeunit Dim outputstring As String MyService.UseDefaultCredentials = True MyService.Url = "http://swk-lab2:7047/DynamicsNAV/WS/SWKTestU5/Codeunit/ItemCodeunit" outputstring = MyService.ReturnDescription("101305") MsgBox(outputstring)
Anyone run into something similar on a table that has a field that is not enabled?
Jason Wilder
jwilder@stonewallkitchen.com
jwilder@stonewallkitchen.com
0
Comments
-
By the way if I make that field active in table 27 it solves the problem. Does this mean we can only use web services with tables that have only active fields?Jason Wilder
jwilder@stonewallkitchen.com0 -
I've tested the scenario and the table I was referencing in my function had disabled field and did not get any error.
I could reproduce it if the field is a flowfield.
So the assumption is no disabled flow field can be used in web services.0 -
That is good to know that it is flowfields only, which makes this problem not as big of a deal as I was initially thinking. I can deal with disabled flowfields, thanks!Jason Wilder
jwilder@stonewallkitchen.com0 -
You're welcome.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