WebServices Integration = Web Site >> NAV 2009 R2

jadetunjijadetunji Member Posts: 26
edited 2013-12-24 in NAV Three Tier
I am pushing data from a web site into a NAV table which contains validation/business logic, hence the decision to use the 'page' webservice.

So far so good...the create and update functions are working fine. However, this requires two calls in order to insert one record. This becomes inefficient for large volumes of data. The CreateMultiple/UpdateMultiple function is not workable as it is an all or nothing option (i.e if one record fails in 5000 all 5000 will be rejected)

There is also a need to capture the end result - fail or success.

Two Questions:
1- Does NAV web service return a status code to know if the transaction fails or succeeds (instead of working with exceptions)
2- Is there another service method that does the insert & modify (all in one) rather than doing 2 calls (Create then Update)

Help!!!!

Comments

  • mikmik Member Posts: 79
    Hello!
    How is the performance by sending so many requests to the webservice. We noticed that it isn't so good to send so many requests. So we implemented one codeunit as an interface between NAV and the external application. This codeunit is processing xml documents which we send and receive.
    If you know a better way let me know. You can also send an answer .. maybe another xml with all lines which could not be processed. :-k

    With kind regards
    mik
  • szortiszorti Member Posts: 1
    Hi,

    I know that this post is kind of old, but maybe my suggestions could be helpful for the others.
    I was dealing lately with task to communicate two NAV DB with each other by web service.
    At the beginning I was thinking to use Page, but if record already exists in table there would be an error with CreateMultiple function.
    To not play with exceptions I've published prepared XMLPort in created codeunit and exposed it as an web service.
    XMLPort was done on temporary table.
    So it was receiving all given records without errors.
    After all records were received I've run through temporary table and inserted or updated records in real table.
    Works perfectly :)
Sign In or Register to comment.