Let's take a quick look at how a function can be created. We'll add a new codeunit to our C/AL application, Codeunit 50000. As this is where we will put any callable functions that we need for our WDTU application, we will simply call it Radio Show Management. In that Codeunit, we'll create a function to calculate a new date based on a given date. If that seems familiar, it's the same thing we did in Chapter 3, Data Types and Fields, to illustrate how a DateFormula data type works. This time, our focus will be on the creation of a function.
Our first step is to copy Table ...