Sometimes it is necessary to have the ID of current object.
If you use record-references, in it you have an function that returns the ID of the table you are using, but it does not exist in codeunits,.... (it DOES exist in REPORTS).
To make it a little easier, it is best to create a function that returns the ID.
If you use it a lot and copy the object to another ID, you just have to change it in that function.
CurrentObjectID() OintCurrentCodeunit : Integer
// CurrentObjectID
// Returns ID of current object
// PARAMETERS:
// RETURN-VALUE : ID of current object
EXIT(CODEUNIT::"RCD Processing");