Description: Counts ReasonToObject mappings for a reason, reason container and object. The current implementation is inconsistent with the registered contract and is not reliable.
Calling convention: Check_ReasonID_in_ReasonContainer_And_ObjectID(ObjectID: Integer, "ReasonContainerName": String, ReasonID: Integer)
Parameters:
ObjectID: registered as Integer, but the implementation treats the first argument as an object name and queries OBJECTS.OBJECTNAME.
ReasonContainerName: entry name; the generated SQL currently appends an unwanted trailing space inside the value.
ReasonID: global reason ID.
Returns: Matching mapping count when all lookups happen to succeed; NULL or undefined values are possible on missing lookups.
Availability: Default; currently unreliable and pending source correction.
Example:
Count := Check_ReasonID_in_ReasonContainer_And_ObjectID("DailyProduction", "DowntimeReasons", 120);