Description: Replaces the standard DBGrid Delete action with a custom formula.
Execution: After the user confirms deletion, a valid OnBeforeDeleteRecord formula runs instead of the standard record deletion. The script must perform any required deletion or alternative action itself. The presence of the valid formula suppresses the standard operation regardless of the value assigned to Result.
Arguments on desktop:
Argument_DataID: selected record identifier.
Argument_SelectedIDStr: selected identifiers represented as a string.
Argument_SelectedIDCount: number of selected identifiers.
Argument_SelectedIDs: selected identifiers as an array. This runtime variable is available but is not declared in the formula editor.
Arguments on web: Argument_ComponentObjectID, Argument_ComponentFilterID and the focused Argument_DataID are assigned. The declared Argument_SelectedIDStr and Argument_SelectedIDCount values are not passed on the web path.
Common arguments: The DBGrid declares Argument_EventName, Argument_SenderName and Argument_SenderID, but does not assign them consistently. Do not rely on their runtime values.
Result: Ignored. Returning False or any other value does not restore the standard deletion.
Availability: DBForm DBGrid component on desktop and web, with the argument differences described above.
Example:
// This formula replaces the standard deletion on both platforms.
ShowMessage("Custom delete handler for record " + Argument_DataID);