Differences in OnGlobalModify from version 4.0 to version 5.0?

After I have moved som code from Navision 4.0 og NAV 5.0 (SP1) then I have seen very different behavior in the OnGlobalModify, OnGlobalInsert, OnGlobalRename and OnGlobalDelete that is explaining why my code suddenly doesn’t work. It seams like these codeunit 1 functions are now called whenever a Table.MODIFY(TRUE) is called, whereas it before was only called automatically when the change was done manually.

Can anyone tell me if you have seen the same bebavior, or even better can refer me to a document describing the differences between the two versions (on this specific topic).

I ran into this as well on one of the projects. that it would insert twice into change log.

Did you ever get this resolved, Erik?

I am running into a similar issue.

Resolved and reselved! Only Rashed has confirmed that he sees the same changes. Never got anyone telling “That’s right, here is a document from Microsoft, where you can see the exact changes to the OnGlobal functions in Codeunit 1”. That’s what I really was looking for

But I got it that much resolved that I can see how it works now, and I found a way around it. The one that was especially tricky is the OnRename, as you really don’t have an parameter saying “RENAME(TRUE)” (to run the triggers). So for rename it will always run the OnRename triggers if there are any, and that also means the OnGlobalRename function.

I am actually looking for this “feature”; tried yesterday in 4.03 and today in 5.01

I tried whith a simple test-report where field “No. printed” in table 112 is changed and table modified - with and without (TRUE).

The Change Log has been set up for “Some Fields” (No. Printed) and “All Fields”, for all combinations of Insertion, Modification and Deletion.

And - yes - the Change Log has been activated.

But no Change Log Entries are inserted caused by this. And then OnGlobal’s in cu 1 are not activated by my code. Works fine when changes are made via form or table directly.

Now - how do you get this to work? Which build are you working with?

Hi Anfinnur,

The problem is actually that it doesn’t work in version 4.00 SP3. After the upgrade the OnGlobal functions worked fine (as I would always have expected them to work). You see if you changed tables in version 4.00 using a codeunit or report, then the onGlobal functions were not called. Instead Microsoft has coded this into some of the reports/codeunits.