Function Definitions
PeopleCode functions can be defined in any PeopleCode program. Function definitions must be placed at the top of the program, along with any variable and external function declarations. The syntax for a PeopleCode function definition is as follows:
Function name[(paramlist)] [Returns data_type]
[statements]
End-functionBy convention, PeopleCode programs are stored in records whose names begin in FUNCLIB_, and they are always attached to the FieldFormula event.
Note:
Application classes can provide an alternative, and sometimes cleaner, mechanism for separating functionality than the functions stored in function libraries.