Description: Looks up a globally loaded reason by name and returns its database ID.
Calling convention: GetReasonIDByName(ReasonName: String): Integer
Parameters:
ReasonName: reason name to find. NULL returns NULL.
Returns: Integer reason ID, or NULL when the input is NULL or the name is not found.
Availability: Default; reads the globally loaded reason collection.
Example:
ReasonID := GetReasonIDByName("Mechanical failure");