TitleEngTAG
OnBeforeSpkDeleteRecord
**OnBeforeSpkDeleteRecord**(SourcePeer: Guid; TargetTable: Integer; var RecRef: RecordRef; var Handled: Boolean; var ErrorMessage: Text[50]; var PanicButton: Boolean)
* This Event will be raised before the deletion of **RecRef** record, from **TargetTable** table, as requested by **SourcePeer** Peer \\
* The subscriber code can modify RecRef (for example, modifying a field); the deleted record will match to RecRef.
* If Subscriber code set **Handled** to TRUE, Sprinkler will assume theat the operation has been done by the Subscriber; Sprinkler execution will continue raising OnAfterSpkDeleteRecord Event.
* If Subscriber code set **ErrorMessage** different from empty string, the record will NOT be deleted, and corresponding Entry will be moved into Data Distribution Import Error table, with Error code D-EVENTERR and Error Message corresponding to ErrorMessage. **WARNING**: Sprinkler operations will continue to next Entry.
* If Subscriber code set **PanicButton** to TRUE, Sprinkler operations will be stopped: the actual Entry will stay in Inbox, and **ErrorMessage** will be logged into Sprinkler Log. To restart Sprinkler activity it is needed to correct the error, or delete the Entry from Inbox table; in both cases, Sprinkler will restart in one minute.
* WARNING: if a Subscriber raises a not handled error, the Delete operation will be rolled back; the Error Message will be logged into Sprinkler Log and the operation will be repeated in one minute.