Execute
Executes multiple insert, delete, or update operations on separate records within a single Web services request.
Usage
You use the Execute method to perform different operations on records within the same Web services request for a single object.
The operations are defined by the operation attribute on the object element in the SOAP request, for example:
<Account operation="insert">
specifies an insert operation for an account object.
The operation attribute can have one of the following values:
update. Updates the specified record
insert. Inserts the specified record.
delete. Deletes the matching record.
skipnode. Skips the parent object and processes the child objects.
Every object specified in the call requires one valid operation. Mixed node operations are allowed for the Execute method.
Arguments
The following table describes the arguments taken by the Execute method.
Name | Description | Required | Default | I/O |
---|---|---|---|---|
ListOf(Object). For example, ListOfAccount |
The list of object instances to be inserted, deleted, or updated. |
Yes |
Not applicable |
Input/Output |
LOVLanguageMode |
The language mode for picklists, see The LOVLanguageMode Argument. |
No |
LIC |
Input |
ViewMode |
Specifies the level of access to records specified in the method call, see The ViewMode Argument. |
No |
Broadest |
Input |
Echo |
Controls whether data sent to Oracle CRM On Demand through integration Web services are recorded as transactions. |
No |
On |
Input |
Return Value of the Call
The status key for each of the Oracle CRM On Demand objects.
Sample SOAP Request - Execute
The following SOAP request performs Execute operations for four separate contact records in a single Web service request. The first operation inserts a record, the second updates, the third deletes, and the final operation ignores the parent contact record and performs an update on the activity child record.
The ContactFirstName and ContactLastName is specified as the user key to identify the contact records in the request. See Contact for a list of valid user key field combinations for the contact object.
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/
XMLSchema-instance" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-
secext-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<wsse:Security>
<wsse:UsernameToken>
<wsse:Username>%%USERNAME%%</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">%%PASSWORD%%</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soap:Header>
<soap:Body>
<ContactExecute_Input xmlns="urn:crmondemand/ws/ecbs/contact/">
<ListOfContact>
<Contact operation="insert">
<ContactFirstName>NewCon5</ContactFirstName>
<ContactLastName>NewCon5</ContactLastName>
</Contact>
<Contact operation="update">
<ContactFirstName>Nathan</ContactFirstName>
<ContactLastName>Lak</ContactLastName>
<ContactEmail>n@l.com</ContactEmail>
</Contact>
<Contact operation="delete">
<ContactFirstName>NewCon5</ContactFirstName>
<ContactLastName>Con5</ContactLastName>
</Contact>
<Contact operation="skipnode">
<ContactFirstName>NewCon6</ContactFirstName>
<ContactLastName>NewCon6</ContactLastName>
<ListOfActivity>
<Activity operation="update">
<Subject>Subject 1</Subject>
<Activity>Task</Activity>
<Priority>1-High</Priority>
</Activity>
</ListOfActivity>
</Contact>
</ListOfContact>
</ContactExecute_Input>
</soap:Body>
</soap:Envelope>
Sample SOAP Response
The following SOAP response contains the returned status keys for the contact objects:
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://
www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns:ContactExecute_Output xmlns:ns="urn:crmondemand/ws/ecbs/contact/">
<ListOfContact xmlns="urn:/crmondemand/xml/Contact/Data">
<Contact>
<ModifiedDate>2011-08-25T15:28:34Z</ModifiedDate>
<CreatedDate>2011-08-25T15:28:34Z</CreatedDate>
<ModifiedById>HRZ780-I5RUE</ModifiedById>
<CreatedById>HRZ780-I5RUE</CreatedById>
<ModId>0</ModId>
<Id>ADSA-9HXB9V</Id>
<CreatedBy>Joanne Brown, 08/25/2011 10:28:34</CreatedBy>
<ModifiedBy>Joanne Brown, 08/25/2011 10:28:34</ModifiedBy>
</Contact>
<Contact>
<ModifiedDate>2011-08-25T15:28:36Z</ModifiedDate>
<CreatedDate>2011-08-04T17:01:41Z</CreatedDate>
<ModifiedById>HRZ780-I5RUE</ModifiedById>
<CreatedById>HRZ780-I5RUE</CreatedById>
<ModId>5</ModId>
<Id>ADSA-93DZIC</Id>
<CreatedBy>Joanne Brown, 08/04/2011 12:01:41</CreatedBy>
<ModifiedBy>Joanne Brown, 08/25/2011 10:28:36</ModifiedBy>
</Contact>
<Contact>
<ModifiedDate>2011-08-12T15:11:17Z</ModifiedDate>
<CreatedDate>2011-08-12T15:11:17Z</CreatedDate>
<ModifiedById>HRZ780-I5RUE</ModifiedById>
<CreatedById>HRZ780-I5RUE</CreatedById>
<ModId>0</ModId>
<Id>ADSA-98V4V7</Id>
<CreatedBy>Joanne Brown, 08/12/2011 10:11:17</CreatedBy>
<ModifiedBy>Joanne Brown, 08/12/2011 10:11:17</ModifiedBy>
</Contact>
</ListOfContact>
</ns:ContactExecute_Output>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>