We can also create our own custom procedures to meet any need. The most common reason to create a new procedure is to provide a single, standardized instance of logic to perform a specific task. When we need to use the same logic in more than one place, we should consider creating a callable procedure.
We should also create a new procedure when we're modifying standard Business Central processes through events. Our procedure then becomes an event subscriber.
If a new procedure is going to be used in several objects, it should be housed in our library codeunit (we may choose to have multiple library codeunits for the purpose of clarity or project management). If a new procedure is only for use in a single object, then it can be resident in that object. This latter option also has the advantage of allowing the new procedure direct access to the global variables within the object being modified, if necessary.