Skip to content

Delete Operations within BPOs and WBOs

Business Processes and Web Business Processes often require that you write your own delete processes. This section will explain how to do this.

A manually coded delete operation consists of the following steps:

  1. Find the record you wish to delete.
  2. Delete the record by sending Request_Delete to the DDO.
  3. Check the status of the delete and react accordingly.

The following example shows a typical delete operation:

Function DeletePerson string sID returns integer
    Handle hoDD
    Boolean bErr
    Move oSalesP_DD to hoDD

    // Step 1: Find the record to delete
    Send Clear of hoDD
    Move sID to SalesP.Id
    Send Find of hoDD EQ 1
    If (not(Found)) Function_Return 1 // error

    // Step 2: Delete the record
    Send Request_Delete of hoDD
    Move (Err) to bErr

    // Step 3: Check status of delete and react
    If not bErr Send Clear of hoDD
    Function_Return bErr
End_Function

If a delete fails, the Err global indicator is set to true.

See Also