SOAP Web Service OnModify Trigger Issue

amr_wafaamr_wafa Member Posts: 23
edited 2015-09-08 in NAV Three Tier
Hi All,

I'm currently facing an issue when consuming a SOAP Web Service which is a published Codeunit. this Codeunit having a function with XMLPort as a parameter that is importing Sales Order to NAV.

I've followed this How-to video https://www.youtube.com/watch?v=y7kvuwKQgYc

When i'm modifying data in sales line table, the OnValidate trigger is firing but when it reached to the OnModify trigger, the record is only having the modified field value on it and it totally ignored any other fields changes made by other Validation triggers or functions fired.

for example: Qty = 1, Unit Price = 2, Amount = 2.
In the Windows App built i'll change the Qty to 2

While debugging, before the debugger reaches to the OnModify Trigger the Amount is 4, but once it hits the OnModify i'll find this:

Qty= 2, Unit Price = 2, Amount = 2 !!

It totally ignored any code executed before reaching the OnModify, as if i'm importing from a CSV without validating any field.
I've followed the exact code written in the Video, i even changed the DefaultFieldsValidation and FieldValidation properties in the XMLPort to yes but still no luck.

I know that it might have nothing to do with the Trigger itself and that this is how the Web Service is reading\modifing records, and that i can import to some temp table and then just add to sales header and lines with my own code but i would really like to know how web services are reading\modifying and creating records.

I have a very basic experience in .NET C#, so any help is appreciated.

I'm using NAV 2015 Build 41779

Thanks Alot.
Sign In or Register to comment.