Hello Everybody
I have a project using Nav 2009 R2 where I expose a page as webservice. Everything works fine, the data can be inserted or updated.
Then I wanted to run some code in the onInsert trigger of the corresponding table. This code works fine when inserting through the classic Nav Client. When the code is triggered from the webservice the code doesn't funtion. When debugging the cs file of the table in Visual Studio I see that the code is processed, but I observed that not every field of the current record (the one to be inserted) is available. It seems as only the primary fields are available. The odd thing is that it still inserts the record correctly.
When I put this code in the onModify trigger of the table and in my c# code using the webservice I put an Update command after the Create command using the same object without modifying it, it works.
Has anybody observed something similar? Thanks for the feedback
Regards, Andreas
0
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
You can read more on this topic here: http://blogs.msdn.com/b/freddyk/archive ... d-rtm.aspx
Quote from this post:
This does not mean that de web service is doing the insert and update for you. You need to first call the Create method. This will return a reference to the inserted record (with the field Key filled in). Than you can use this variable to specify the other values and call Update function.
My blog