Let's take a quick look at how a procedure can be created. We'll use the small date formula app we created in Chapter 3, Data Types and Fields, and add a new codeunit, Codeunit 50141. We will call it Date Formula Management.
We will create our new codeunit by simply clicking on New File in the File menu, then choosing File | Save As, and entering Codeunit 50141 Date Formula Mgt. We will select the codeunit snippet and populate the variables.
Now comes the important part—designing and coding our new procedure. When we had the procedure operating as a local procedure inside the table where it was called, we didn't worry about passing data back and forth. We simply used the data fields that were already present in the table and treated them as global variables, which they were. Now that our...