Options

Issue in DELETE Function - WEB Services (Sales Line)

Ravi_ThakkarRavi_Thakkar Member Posts: 392
edited 2009-09-22 in NAV Three Tier
Hello All,

Cuurently I am working with Sales Order Sub Form Page web service in Visual Studio .NET (C#).
I used the Delete function of the same web service.
I found that, if there is not any error in between of the execution then I am able to delete the Sales Line from the Sales Order.

If there is any error in between, then it should catch that error at .net side and we should be able to show that error message, as the general behaviour of Web-Services.
But, the Delete function is not showing any error at .NET side and also not deleting the record as well as it is not stoping the execution.

Is there any there any bug in Delete function of Web-Service?
Please, help me regarding.
Thanks in Adv.
Ravi_Thakkar
Ahmedabad, Gujarat, India
E Mail : ravi.thakkar@hotmail.com

Comments

  • Options
    freddy.dkfreddy.dk Member, Microsoft Employee Posts: 360
    It depends on why Delete fails.
    Delete is a boolean function, which returns false if you cannot delete the record.
    If it fails due to an exception it is can be catched.
    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.
  • Options
    Ravi_ThakkarRavi_Thakkar Member Posts: 392
    Yes, Freddy.
    You are right. Delete function only Deletes the Record and returning true, Else it is returning false.
    It is not catching any Error messages at .NET side, like other Functions of the Web-Services doing.
    Thanks for your reply.

    Is there any sollution to this? I mean, if I need to have the Error messages to be fetched at .NET side then?
    Thanks in Adv.
    Ravi_Thakkar
    Ahmedabad, Gujarat, India
    E Mail : ravi.thakkar@hotmail.com
  • Options
    Ravi_ThakkarRavi_Thakkar Member Posts: 392
    Hello Freddy,

    I tried for the DELETION of Sales Line by using array and then update function of Sales Order web service. But, unable to do the same.

    Can you please suggest in some detail?

    Thanks in Adv.
    Ravi_Thakkar
    Ahmedabad, Gujarat, India
    E Mail : ravi.thakkar@hotmail.com
  • Options
    freddy.dkfreddy.dk Member, Microsoft Employee Posts: 360
    I thought this topic was too large to describe here - AND the fact that SP1 changes some things - I have created a description on how to work with Sales Orders through page based web services on my blog:

    http://blogs.msdn.com/freddyk/archive/2 ... d-rtm.aspx

    Hope that helps
    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.
  • Options
    Ravi_ThakkarRavi_Thakkar Member Posts: 392
    Thanks Freedy.

    I will go through your blog on specified link.
    Thanks for help.
    Ravi_Thakkar
    Ahmedabad, Gujarat, India
    E Mail : ravi.thakkar@hotmail.com
  • Options
    Ravi_ThakkarRavi_Thakkar Member Posts: 392
    Hello All,

    Is there any updates in DELETE function behaviour in NAV 2009 SP1?
    In terms of returning the Values like true and false only? or able to Catch the errors on .NET side.?
    Ravi_Thakkar
    Ahmedabad, Gujarat, India
    E Mail : ravi.thakkar@hotmail.com
  • Options
    freddy.dkfreddy.dk Member, Microsoft Employee Posts: 360
    No - nothing have changed there.
    If you want more control, you can write a codeunit and handle things yourself.

    /Freddy
    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.
  • Options
    Ravi_ThakkarRavi_Thakkar Member Posts: 392
    freddy.dk wrote:
    No - nothing have changed there.
    If you want more control, you can write a codeunit and handle things yourself.

    /Freddy
    Thanks for reply.
    Actually I have performed same thing.

    But, I am worrying about concurrency due to Codeunit.

    Whether I need to worry about?
    And If I want to test my application for concurency then how can I test? Any Suggestion?
    Ravi_Thakkar
    Ahmedabad, Gujarat, India
    E Mail : ravi.thakkar@hotmail.com
  • Options
    freddy.dkfreddy.dk Member, Microsoft Employee Posts: 360
    Why should there be any issue with concurrency in a codeunit that you wouldn't have in a page?
    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.
Sign In or Register to comment.