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
Parameter | Type | Description |
---|---|---|
configName | String | The name of the configuration (app) containing the record to delete |
id | Number/String | The ID of the record to delete |
showMessageBox | Boolean | (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
is0
ornull
, the function returnsnull
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.