WebService error after changing an option field

GoyoGoyo Member Posts: 36
edited 2012-10-30 in NAV Three Tier
Hi. I have a WebService for Job table through a Page. This page was a new page I created for this WebService. I use the WebService from a Web that has been made using .net. The Web was working fine until I modified an option field adding a new value at the end of the OptionString. In the development environment it works fine, but when I updated the production environment, an error pops when I try to modify the option field. In spanish the error is "No se puede escribir 'En proceso' en Integer. ". 'En proceso' is one of the OptionString values (the value the field has now). Translation the error is "You can't write 'En proceso' in Integer".

I've tried to stop and start windows services (IIs, Navision WebServices, Navision Server), to recompile the entire Web, to modify the web page where I get the error... Nothing works, the error still pops.

When I change the value in Navision Classic Client, it's working fine, and the new value is been stored, and in the web page I can see the new value, the error only pops when I try to modify the value of the Option field from the web page through the web services.

Any ideas?

Answers

  • kinekine Member Posts: 12,562
    The calling app need to refresh the wsdl (webservice definition) to understand the new enum value.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • GoyoGoyo Member Posts: 36
    kine wrote:
    The calling app need to refresh the wsdl (webservice definition) to understand the new enum value.

    Hello kine. The wsdl file was already updated. The worst of all is that I can't make it fail in my computer. Maybe it's a problem with the Nav object? I think I'll have to create a new page.
  • krzychub83krzychub83 Member Posts: 120
    Hi
    Please have a look here: http://blogs.msdn.com/b/nav/archive/2011/04/28/about-object-metadata-and-why-i-can-t-see-object-changes-in-rtc.aspx

    This will sound strange but few of my .NET developers have been telling me that they were not able to see changes, which had been made in NAV, until termination of the whole NAV Server process tree from the Task Manager. So go to the task manager, find NAV Service in the services. Then right click and chose go to process. Then right click and end process tree.

    Please validate if your dev environment build version is the same like the live environment build version. I have seen few issues related to this. You might thought that everything is fine, because NAV does not require database recompilation, but the middle tier server is just breaking on that object.

    Good luck
    KB
  • mihail_kolevmihail_kolev Member Posts: 379
    how exactly you try to modify the option value? (C# code)

    an example for updating option through .NET is
    record.YourOptionFiled = YourService.YourOptionField.OptionValue
    
    -Mihail- [MCTS]
  • GoyoGoyo Member Posts: 36
    how exactly you try to modify the option value? (C# code)

    an example for updating option through .NET is
    record.YourOptionFiled = YourService.YourOptionField.OptionValue
    

    Yeah, that's the way I am updating the option.

    The error pops in the WebService Update function. And it was working find before modifying the option field.
  • GoyoGoyo Member Posts: 36
    Hi. We finally found the error (my colleague Pailar). The error pops when the Navision Change Log is activated for the option field. When we deactivate it, it works fine. The problem is that we need the change log to be running.

    I've turned ON the Change Log in my database and the error pops in development environment too. It fails only with option fields, if I do the same with text fields, it doesn't fail.

    Any ideas on what I should try?
  • GoyoGoyo Member Posts: 36
    In order to solve this issue, we have used another WebService (with codeunit) just for this field. And it works !!!! Sadly, even though the Change Log is activated, navision doesn't log this change. Does anyone know if changes through web services are logged in navision?
Sign In or Register to comment.