Bookshelf Home | Contents | Index | Search | PDF | ![]() ![]() ![]() ![]() |
Siebel Portal Framework Guide > Delivering Content to External Web Applications > Common Operations >
Querying Items
To successfully perform a query, you must first navigate to a screen that allows queries. You must then send two separate requests to the eBusinessSWEXML application. The first request executes the Create New Query action, and the second executes the Execute Query action.
NewQuery
<?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
In the ExecuteQuery command block, you must include an <ARG> tag. The tag must include a NAME parameter to identify the column (the field you want to search), and a value to indicate the search criteria.
<?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="column name">search criteria</ARG>
<ARG NAME="SWESetMarkup">XML</ARG>
<ARG NAME="SWEDataOnly">TRUE</ARG>
<ARG NAME="SWESetNoTemp">TRUE</ARG>
The auction items that match the query are returned in the response. The returned payload contains complete lot names and IDs for each item.
TIP: Each row (or record) within a response contains an ID that uniquely identifies it. You can use a row ID as a parameter in a query to selectively single out a record so that you can modify or delete it.
Adding Records
To successfully add a record to a list, you must first navigate to a screen that allows records to be inserted. Then, you must send two separate requests to the SWEXML application. The first request executes the New Record action. The second executes the WriteRecord action.
In a NewRecord command block, you use <ARG> tags to indicate the view and applet to which you want to add the NewRecord.
<?xml version="1.0" encoding="UTF-8"?>
<EXEC PATH="/callcenter/start.swe">
<CMD NAME="SWECmd" VALUE="InvokeMethod">
<ARG NAME="SWEMethod">NewRecord</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>
WriteRecord
In a WriteRecord command block, you must include an <ARG> tag for the row id of the record (SWERowID) and another <ARG> tag to indicate that the row id is required for the operation (SWEReqRowId).
<?xml version="1.0" encoding="UTF-8"?>
<EXEC PATH="/callcenter/start.swe">
<CMD NAME="SWECmd" VALUE="InvokeMethod">
<ARG NAME="SWEMethod">WriteRecord</ARG>
<ARG NAME="SWEReqRowId">1</ARG>
<ARG NAME="SWEView">view name</ARG>
<ARG NAME="SWERowId">row id of record to be saved</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 |