Hi everyone,
I have created an XMLPort to insert items with several fields (Description,UOM, Unit Price, etc.)
The problem is that when for example UOM doesn't exist in the table, I get an error message for that, but the item is inserted anyway.
How can I prevent that? Is it a property to change in the XMLPort or so?
Thanks in advance
Answers
1) There is a COMMIT statement in the OnValidate() trigger of one of the fields on the Item table - this causes the Item insert to be committed to the database instead of rolling back when the error occurs
2) There is a bug in that build of NAV
I think option 1 is the most likely scenario
See https://msdn.microsoft.com/en-us/library/dd338651(v=nav.90).aspx
https://msdn.microsoft.com/en-us/library/dd355394(v=nav.90).aspx