Weird behavior of 2009 SP1

Hello together,

I found a weird behavior in 2009 Classic Client (SQL)

It looks like the system would ignore table code when running on a form.
Instead when firing the trigger from running the table directly it seems to work.


When deleting one sales line - another one is modified and a related record in another table is getting deleted (Table OnDelete-Trigger).
This works fine when running the table directly from object designer and deleting a record.

When creating a new form based on the sales line table with no code in any form trigger, the code runs (I saw it in the debugger) but the related table still exists afterwards and the other sales line record is not changed.

Similar behavior I have found in a “OnValidate” trigger of a field in the Purchase Header table.

I can see the code running, just before leaving the trigger the changed fields all show the new value. After returning to the form the fields are clear again. But when running the trigger a second time (reentering the same value) it works.

I’m programming in Navision for 12 years now and have never seen such things happening.

I can’t recreate this. I suggest to load some selfcontained objects in 50K range that can be used to replicate it.

Hi Thomas,

The only thing I can suggest is that if the line you are updating is on the form the the form update is resetting the record i.e. your trigger fires and then returns to the form which then updates the record back to it’s original state. This would not explain the other table delete unless there is a trigger to re-insert the record.

Unfortunately this behavior is not really “reproducable” (If it would be , I would have solved it already [;)]).

The question is if somebody else has discouvered similar behavior so we should start to investigate with Microsoft or if we are the only ones with this problem. If so I would guess some weird code of myself.

The behavior looks like an invisible “ERROR” occurs at a certain stage after the triggers ran. There is definitely no code in the form at all (New created with the wizard and that was it).

I close this issue.