Description: Deletes all reasons, or one optional reason ID, from the specified reason container and target record.
Calling convention: CIP_DeleteReasons("ReasonContainerName": String, "TargetObject": String, Target_DATA_ID: Integer, [ReasonID: Integer])
Parameters:
ReasonContainerName: target reason-container entry name.
TargetObject: target object name.
Target_DATA_ID: target record DATA_ID.
ReasonID: optional reason ID; omission deletes the whole container.
Returns: TRUE after a completed local or database deletion; FALSE for NULL arguments, unknown entries, or unknown objects.
Availability: Default; destructive to reason data and may recalculate the target record.
Example:
Success := CIP_DeleteReasons("DowntimeReason", "ProductionEvents", 1250, 1201);