Description: Replaces the standard DBGrid Add New Record action with a custom formula.
Execution: When the user presses the DBGrid Add button and a valid OnBeforeAddNewRecord formula exists, the formula runs instead of the standard record-creation action. The script must perform any required custom action itself. Without a valid formula, the standard add-record operation runs.
Arguments: No event-specific argument is declared. DBGrid execution paths do not currently guarantee the common component arguments, so scripts should not depend on them.
Result: Any value assigned to Result is ignored. The presence of a valid formula, rather than its result, suppresses the standard action.
Availability: DBForm DBGrid component on desktop and web.
Example:
// This custom action replaces the standard record creation.
ShowMessage("Use the custom new-record workflow");