Option Field issue - using Web service

alwaysguna
Member Posts: 45
Hi All ,
I am facing a unique problem which I wanted share with you all.
Step1: Exposed Customer Card (Page 21) as webservice and consumed the same from .NET
Step2: Using the below code to save some values in Customer table
Customer.ID = 'XXXX'
Customer.Name = "Guna"
Customer.Application_Method = Application_Method.Manual;
Customer.Save()
Note that Application_Method is a Enumerated datatype in .NET with definition as Application_Method
Step3: Exposed Vendor Card (page 26) as webservice which also has the option field Application Method.
Once Vendor card is exposed the definition Cusomer.Application_Method is getting automatically changed to Application_Method1 and you cannot compile the code unless the below code is written
Customer.Application_Method1 = Application_Method1.Manual;
After publishing vendor card the definition changed as follows
1- Customer Card
Customer.Application_Method changed to Customer.Application_Method1
2- Vendor card
Vendor.Application_Method is Customer.Application_Method
This issue occurs whenever you expose a new webservice with same option field;option field is changing to different type that is
Customer.Application_Method2, Vendor.Application_Method1 etc...
if again new webservice is exposed with same option field
Customer.Application_Method3, Vendor.Application_Method2 etc...
. Have anyone encountered similar problem with option fields ..?
I am facing a unique problem which I wanted share with you all.
Step1: Exposed Customer Card (Page 21) as webservice and consumed the same from .NET
Step2: Using the below code to save some values in Customer table
Customer.ID = 'XXXX'
Customer.Name = "Guna"
Customer.Application_Method = Application_Method.Manual;
Customer.Save()
Note that Application_Method is a Enumerated datatype in .NET with definition as Application_Method
Step3: Exposed Vendor Card (page 26) as webservice which also has the option field Application Method.
Once Vendor card is exposed the definition Cusomer.Application_Method is getting automatically changed to Application_Method1 and you cannot compile the code unless the below code is written
Customer.Application_Method1 = Application_Method1.Manual;
After publishing vendor card the definition changed as follows
1- Customer Card
Customer.Application_Method changed to Customer.Application_Method1
2- Vendor card
Vendor.Application_Method is Customer.Application_Method
This issue occurs whenever you expose a new webservice with same option field;option field is changing to different type that is
Customer.Application_Method2, Vendor.Application_Method1 etc...
if again new webservice is exposed with same option field
Customer.Application_Method3, Vendor.Application_Method2 etc...
. Have anyone encountered similar problem with option fields ..?
Guna
0
Comments
-
What namespace did you give the references when imported to .net?
It sounds like you gave them the same namespace?
I always give them CustomerPageRef, VendorPageRef etc. - that should remove the problem - but I will check.Freddy Kristiansen
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.0 -
Hello Freedy ,
Changing the namespace doesnt make any difference, I assume this is a bug to be fixed by Microsoft, but just wanted to make sure it is the same for everyone.
Regards ,
GunaGuna0
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