Zum Hauptinhalt springen

deleteConfigRecordById

This function deletes a record from a specific configuration in the brixxbox system. It provides the ability to delete records from any configuration, even if it's not the current app.

Syntax

app.deleteConfigRecordById(configName, id, showMessageBox)

Parameters

ParameterTypeDescription
configNameStringThe name of the configuration (app) containing the record to delete
idNumber/StringThe ID of the record to delete
showMessageBoxBoolean(Optional) If set to true, displays a confirmation dialog before deleting. Default is false

Return Value

Returns the server response if successful, or null if the operation fails or if the provided ID is invalid.

Examples

Example 1: Delete a record without confirmation:

// Delete record 123 from the "address" config without confirmation
app.deleteConfigRecordById("address", 123);

Example 2: Delete a record with confirmation:

// Delete record 123 from the "address" config with confirmation dialog
app.deleteConfigRecordById("address", 123, true);

Notes

  • If id is 0 or null, the function returns null without performing any action.
  • This function does not trigger the RecordDelete event on the current form.
  • For deleting records in the current form, consider using the deleteRecord() function instead.