The delete operation is used to delete an instance of a record. It is similar to the deleteList operation, except that it permits only one record to be deleted per request.


The DeleteRequest type is used for the request. It contains the following fields.

Element Name

XSD Type




Indentifies the record to be deleted.



Identifies a deletion reason and deletion reason memo. This parameter supports the Use Deletion Reasons feature, which requires users to provide reasons when they delete transactions. However, even when this feature is not enabled, you must use this parameter with every delete request. (You can provide a value of null in such cases.) For more details, see Deletion Reason Usage Notes.

Deletion Reason Usage Notes

Note the following about the deletionReason parameter:

For more details about the Use Deletion Reasons feature, see Recording a Reason for Deleting a Transaction.


The DeleteResponse type is used for the response. It contains the following fields.

Element Name

XSD Type




Contains details on the status of the delete operation and a reference to the deleted record.


This operation can throw one of the following faults. See SOAP Fault Status Codes for more information on faults.


If you attempt to delete a record that does not exist, the system returns an INVALID_KEY_OR_REF error.

Sample Code

The following example shows how to delete a cash sale transaction.


          private void deleteCashSale()
   RecordRef myCashSale = new RecordRef();
   myCashSale.internalId = "1745";
   myCashSale.type = RecordType.cashSale;
   myCashSale.typeSpecified = true;

   RecordRef myDeletionReasonCode = new RecordRef();
   myDeletionReasonCode.internalId = "3";

   DeletionReason myDeletionReason = new DeletionReason();
   myDeletionReason.deletionReasonCode = myDeletionReasonCode;
   myDeletionReason.deletionReasonMemo = "Per John in Accounting";

   _service.delete(myCashSale, myDeletionReason);



SOAP Request

   <delete xmlns="">
      <baseRef type="cashSale" internalId="1745" xsi:type="q1:RecordRef" xmlns:q1=""/>
            <deletionReasonCode internalId="3" xmlns=""/>
            <deletionReasonMemo xmlns="">Per John in Accounting</deletionReasonMemo>


SOAP Response

   <deleteResponse xmlns="">
         <platformCore:status isSuccess="true" xmlns:platformCore=""/>
         <baseRef xsi:type="platformCore:RecordRef" type="cashSale" internalId="1745" xmlns:platformCore=""/>


Related Topics

Recording a Reason for Deleting a Transaction
SuiteTalk SOAP Web Services Platform Overview
SOAP Web Services Development Considerations
SOAP Web Services Processing
SOAP Web Services Operations
SOAP Web Services Standard Operations
SOAP Web Services List Operations
SOAP Web Services Asynchronous Operations

General Notices