Option Field issue - using Web service

alwaysgunaalwaysguna Member Posts: 45
edited 2010-01-25 in NAV Three Tier
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 ..?
Guna

Comments

  • freddy.dkfreddy.dk Member, Microsoft Employee Posts: 360
    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.
  • alwaysgunaalwaysguna Member Posts: 45
    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 ,
    Guna
    Guna
Sign In or Register to comment.