Deletes records on a subpage of the current page.

This operation is exposed only by pages that have subpages, which are pages that have parts of type page. For example, the Sales Order page has a part with the name SalesLines, which has PartType equal to Page and PagePartID equal to “Sales Order Subform.” The name of the operation that is exposed by the Sales Order page is therefore Delete_SalesLines.

When you call this operation, you delete a record of the subpage. When you call Read on a page that has a subpage, you get the records of the top level page and the corresponding records of the subpage. To modify them or add to them, you must modify the entire top-level record.

Executing the Delete_<part> operation in a Web service first executes the OnDeleteRecord Trigger on the designated record of the subpage. If application code in the OnDeleteRecord trigger for the record of the subpage returns true, then the OnDelete Trigger for the corresponding table is executed. If no fault occurs, the record of the subpage is deleted from the database.

If the application code in the trigger returns false, then the OnDelete trigger is not executed. But this does not necessarily mean that the record of the subpage 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_<part> operation is the return value from the page's OnDeleteRecord trigger.

If Delete returns true, thenthe record of the subpage has been deleted. If Delete has thrown a fault, then the record of the subpage has not been deleted. But when Delete returns false, then this indicates that there was application logic involved, and the record of the subpage may or may not have been deleted.

Expand imageParameters

Expand imageResults

Expand imageFaults

Expand imageUsage Example

Expand imageSee Also