• Michael Intravartolo

When Changing a Codeunit Subtype


Since a couple of years codeunits have a property called Subtype. Selecting a specific value for this property changes the behavior of the codeunit, one of them being an extra property added to functions, i.e. Function Type (for Test Codeunits and Upgrade Codeunits) which defaults to a specific value depending on the Subtype value.

Now what happens when you change the Subtype of a codeunit?

As a Function Type values depend on the codeunits Subtype C/SIDE cannot just leave the Function Tpe as is. Let's try and see.

Scenario 1 - Changing a Test Codeunit to Normal

So we create a test codeunit with a test function:


And change the Subtype to Normal:


Now C/SIDE removes any test artifacts that do not make sense in a normal codeunit:


Scenario 2 - Changing An Upgrade Codeunit to Normal

Let's do the same with a Upgrade codeunit:


I.e. change the Subtype to Normal:


Logically as in the previous case, C/SIDE removes any upgrade artifacts that do make sense in a normal codeunit:


This perfectly makes sense...but for one fact: why aren't the functions set to local as is the default behavior in NAV 2015?? I would prefer that as I wouldn't want any previous test or upgrade function being exposed outside of the codeunit by default.

What do you think?

#microsoftdynamicsnav

39 views
Contact Us

Solution Systems, Inc.

3201 Tollview Dr. 

Rolling Meadows, IL 60008

Office: 847-590-3000

Email: info@solsyst.com

Support: 224-345-2020

Support Email: support@solsyst.com

  • Manufacturing Software | Illinois
  • Manufacturing Software | Illinois
  • Manufacturing Software | Illinois
  • Manufacturing Software | Illinois
  • Manufacturing Software | Chicago
  • Manufacturing Software | Illinois
  • Microsoft Business Podcast
  • Manufacturing Software | Chicago
  • Manufacturing Software | Chicago
  • Manufacturing Software | Chicago