This time, I’ll present you with another way to use Codeunits in NAV.
By using Codeunits as parameters to a function, you can use Codeunits as (sort of .NET) Classes.
If you declare different local variables to the same Codeunit, they even have their own version.