The DeleteCritiqueByObjectID method is a public subroutine in the Critique component that accepts two parameters (ObjectID and ConnectionString) and calls the private DeleteRecord method, which deletes the critique record. The ObjectID (the subset of an objectId in the Critique table of the FmLib database and the temporary identifier of the message) is concatenated with a string that contains the field name and is passed to the DeleteRecord method as the filter for the delete. The Like predicate is used, ObjectID is prefixed with the wildcard (%), and "0000" is appended because the messageID is no longer available after the message is deleted; the temporary identifier, which is assigned by the MAPI session, is a subset of the original messageID and the matching sequence of characters can appear anywhere in the objectId of the record in the Critique table. The second parameter passed to the DeleteRecord method, False, indicates that this delete is not initiated by the approver.
DeleteRecord "ObjectID Like '%" & objectID & "0000'", False
The Critique component is instantiated in the server-side script that runs when the Folder_OnMessageDeleted event fires on the public folder in which the critiques are posted; the DeleteCritiqueByObjectID method in the Critique component is then called. This action occurs when a reviewer deletes a critique from the public folder.
The complete code for the DeleteCritiqueByObjectID method is available in Critique.cls Server-Side COM Component in the code section.