Bookshelf Home | Contents | Index | Search | PDF | ![]() ![]() ![]() ![]() |
Siebel Portal Framework Guide > Delivering Content to External Web Applications > Common Operations >
Deleting Records
To successfully remove a record from the database, you must first navigate to a screen that allows records to be deleted. Then, the following three requests must be sent separately to the eBusinessSWEXML application:
NOTE: When deleting a record, you should use a primary key (such as a row ID) as the parameter for the query. This makes sure that only one record is returned and selected in the response. If you do not use a primary key to perform the query, several records may be returned in the response. There is a chance that the record you want to delete is not the one selected.
NewQuery
When you delete a record, you must first execute a query to find the record you want to delete. You should use search criteria, such as a primary key, to make sure that the query returns only one record.
<?xml version="1.0" encoding="UTF-8"?>
<EXEC PATH="/callcenter/start.swe">
<CMD NAME="SWECmd" VALUE="InvokeMethod">
<ARG NAME="SWEMethod">NewQuery</ARG>
<ARG NAME="SWEView">view name</ARG>
<ARG NAME="SWEApplet">applet name</ARG>
<ARG NAME="SWESetMarkup">XML</ARG>
<ARG NAME="SWEDataOnly">TRUE</ARG>
<ARG NAME="SWESetNoTemp">TRUE</ARG>
ExecuteQuery
When you use the ExecuteQuery command block in an effort to delete a record, you must include an <ARG> tag that identifies the primary key of the record you want to delete. This makes sure that the query returns only one record, which is automatically selected. You can then use the DeleteRecord command to delete the selected record.
<?xml version="1.0" encoding="UTF-8"?>
<EXEC PATH="/callcenter/start.swe">
<CMD NAME="SWECmd" VALUE="InvokeMethod">
<ARG NAME="SWEMethod">ExecuteQuery</ARG>
<ARG NAME="SWEView">view name</ARG>
<ARG NAME="SWEApplet">applet name</ARG>
<ARG NAME="primary key column name">primary key value</ARG>
<ARG NAME="SWESetMarkup">XML</ARG>
<ARG NAME="SWEDataOnly">TRUE</ARG>
<ARG NAME="SWESetNoTemp">TRUE</ARG>
DeleteRecord
You use <ARG> tags to indicate the view and applet that contain the selected record you want to delete.
<?xml version="1.0" encoding="UTF-8"?>
<EXEC PATH="/callcenter/start.swe">
<CMD NAME="SWECmd" VALUE="InvokeMethod">
<ARG NAME="SWEMethod">DeleteRecord</ARG>
<ARG NAME="SWEView">view name</ARG>
<ARG NAME="SWEApplet">applet name</ARG>
<ARG NAME="SWESetMarkup">XML</ARG>
<ARG NAME="SWEDataOnly">TRUE</ARG>
Bookshelf Home | Contents | Index | Search | PDF | ![]() ![]() ![]() ![]() |
Siebel Portal Framework Guide Published: 09 September 2004 |