# Delete Operation
Deletes a single record.
Executing the Delete operation in a web service first executes the ../developer/triggers-auto/page/devenv-ondeleterecord-page-trigger on the designated page. If application code in the OnDeleteRecord trigger for the page returns true, then the ../developer/triggers-auto/table/devenv-ondelete-table-trigger for the corresponding table is executed. If no fault occurs, then the record is deleted from the database.
If the application code in the trigger returns false, then the OnDelete trigger is not executed. This does not necessarily mean that the record has not been deleted because it may have been deleted explicitly by the application code for the page's OnDeleteRecord trigger.
The return value from the Delete operation is the return value from the page's OnDeleteRecord trigger.
If Delete returns true, then the record has been deleted. If Delete has thrown a fault, then the record has not been deleted. But when Delete returns false, then this indicates that there was application logic involved, and the record may or may not have been deleted.
## Method Signature
`bool Delete(string key)`
## Parameters
Parameter|Description
key|Type: String<br /><br /> The bookmark of the record, including both primary key and concurrency information.
## Results
Result name|Description
Delete_Result|Type: Boolean<br /><br /> The value that is returned by the OnDeleteRecord page trigger.
## Faults
SOAP fault message|Description
Other user has modified \[*record name*\].|Indicates that another user or process has modified the record after it has been retrieved for this delete operation.
\[*record name*\] \[*field*\] \[*value*\] does not exist.|Indicates that the record has been deleted by another user or process after it has been retrieved for this delete operation.
Other faults are possible if they are generated by the AL code.
## Usage Example
```c#

      using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication
{
    // Imports newly generated web service proxy.
    using WebService;

    class Program
    {
        static void Main(string[] args)
        {
            // Creates instance of service and sets credentials.
            Customer_Service service = new Customer_Service();
            service.UseDefaultCredentials = true;
            Customer cust = new Customer();
            cust.Name = "Customer Name";
            service.Create(ref cust);
            cust = service.Read(cust.No);
            service.Delete(cust.Key);
        }
    }
}
```
## Related information
basic-page-operations

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/webservices/delete-operation, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/webservices/delete-operation/
