Handling Error during Validate function

tushaar99tushaar99 Member Posts: 35
Hi All,

I want to handle the error if any, thrown by the validate function.

I am getting a XML file from a Web Application which has data which needs to be uploaded in the Gen Journal Line table. So if an error occurs while doing the validate, I want to catch it in the code and send the response to the Web Application.

Is this possible?

Thanks in advance for any help that comes up...

Regards,
Tushaar.
Regards,
Tushaar

Comments

  • kinekine Member Posts: 12,562
    For this it is better to create WebService in NAV and call it from the Web application if possible, because if there is some error during the call, it will be sent to the caller automatically. But if NAV is the client, it is hard to catch the errors. You can try to use the new commands in NAV 5.0 to handle that, but passing the error back means to call another webservice with passing the message. Because if you are calling webservice, you are sending request and receiving answer, but you cannot send error after you received the answer...

    But all is question of design of the system.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • tushaar99tushaar99 Member Posts: 35
    Hi,

    Thanks for the reply.

    The problem over here is that the client is using Nav 3.70.

    Can u give me a solution specific to this version?

    Regards,
    Tushaar.
    Regards,
    Tushaar
  • kinekine Member Posts: 12,562
    Just search for the WebService and you will find posts about how to create your own webservice in NAV (there are some posts on blogs too, just use google to find them, links are in the forum too...)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.