Question / Problem:
Is there a method by which we may restrict specific users from closing batches in KTM thin client validation, allowing only for suspension?
Answer / Solution:
The "Batch_Close" event cannot be used to cancel a batch closing operation. At that point, it is too late to cancel the operation.
The "Batch_InteractiveClosing" event can be used to prevent a user from closing a batch.
When a batch gets closed during a user interactive module (Document Review, Validation, Verification, Thin Client Validation, or Thin Client Verification) then the "Batch_InteractiveClosing" event gets fired once before the "Batch_Close" event.
This event can be used to stop a user from closing a batch. The batch object can be accessed by the "pXRootFolder" parameter that is read-only in this event and cannot be modified.
It has also a "CloseMode" parameter with possible values of "CscBatchCloseSuspend", "CscBatchCloseError", and "CscBatchCloseFinal". Another parameter called "bCancel" can be set to true to cancel the closing of the batch. Finally, the "sMessage" parameter can be configured to contain text that will be shown as user information to explain why the closing of the batch was cancelled.