Options

Can I return a result from page web service ?

bob_upbob_up Member Posts: 155
edited 2009-05-26 in NAV Three Tier
I need to allow a 3rd party application to insert customers, jobs and other details. I am looking at using page web services.

If the insertion fails (e.g. the customer number already exists) I need to let the calling application know. It would be nice to return the reason for the failure too.

Is this possible using pages or should I be using a different approach (i.e. codeunit/XMLports) ?

Comments

  • Options
    ara3nara3n Member Posts: 9,255
    Pages will return the exception if insertion fails.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Options
    bob_upbob_up Member Posts: 155
    How does the external application read the exception ? I cant see this in the help. Is there some documentation I am not aware of ?
  • Options
    ara3nara3n Member Posts: 9,255
    well in C# you can use Try and Catch statement and exception will contain the error.

    If you are using web service toolkit, the response xml file will contain the error.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Options
    bob_upbob_up Member Posts: 155
    Thanks Rashed :)
Sign In or Register to comment.