To create a new codeunit by using Object Designer, use the following procedure.
To create a codeunit
On the Tools menu, choose Object Designer.
In Object Designer, choose Codeunit.
Choose the New button to create a new codeunit.
In the C/AL Editor, add functions.