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");
Comments
I couldn't figure out what is the "RCD Processing"...it is only a sample!!! #-o
Nice, indeed...it makes the code easier to read and to write
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog