Oracle Web Services On Demand Guide > Web Services On Demand API Calls > Web Services v2.0 API Calls >

Update


Updates the selected record with the new values.

Usage

You use the Update method to update one or more records of a particular object in an Oracle CRM On Demand instance.

The Update method can be used to update parent records and child records. If a child node is specified in the request, the Update method updates the child in the existing parent record. If the child node is missing, the Update method updates only the existing parent record.

NOTE:  If the administrator customizes a record type to add a required field, Oracle CRM On Demand does not check for the required field when existing records are updated. When you update the record without the required field through a Web services request, or merge it with a record that does not have the required field, the record is updated or merged without error. This is the intended behavior; when a field is made required, it is the responsibility of the administrator to update all existing records to populate the required field. When inserting new records however, Oracle CRM On Demand checks for the required field.

Arguments

Table 39 describes the arguments taken by the Update method.

Table 39. Arguments Taken by the Update Method
Name
Description
Required
Default
I/O

ListOf(Object). For example, ListOfAccount

The object instance to be updated.

Yes

Not applicable

Input/Output

LOVLanguageMode

The language mode for picklists, see The LOVLanguageMode Argument.

No

LIC

Input

Echo

Controls whether data sent to Oracle CRM On Demand through integration Web services are recorded as transactions.

No

On

Input

ViewMode

Specifies the level of access to records specified in the method call, see The ViewMode Argument.

Yes

Broadest

Input

Return Value of the Call

The status key for the updated objects.

Sample SOAP Request - Update

The following SOAP request updates an existing contact record.

The ContactFirstName and ContactLastName are specified as the user key to identify the contact records in the request. See User Key Fields on the Contact Object for a list of valid user key field combinations for the contact object.

NOTE:  If there are multiple records in Oracle CRM On Demand with the same ContactFirstName and ContactLastName, the update request fails with a multiple match error. It is recommended to use the ID user key field to uniquely identify records as it avoids multiple match errors and also improves performance.

<?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>

      <ContactUpdate_Input xmlns="urn:crmondemand/ws/ecbs/contact/">

         <Echo>On</Echo>

         <LOVLanguageMode>LIC</LOVLanguageMode>

         <ListOfContact>

            <Contact>

               <ContactFirstName>ExistingCon1</ContactFirstName>

               <ContactLastName>ExistingCon1</ContactLastName>

               <ContactEmail>e@e.com</ContactEmail>

            </Contact>

         </ListOfContact>

      </ContactUpdate_Input>

   </soap:Body>

</soap:Envelope>

Sample SOAP Response

The following SOAP response contains the returned status keys for the updated 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:ContactUpdate_Output xmlns:ns="urn:crmondemand/ws/ecbs/contact/">

         <ListOfContact xmlns="urn:/crmondemand/xml/Contact/Data">

            <Contact>

               <ModifiedDate>2011-08-10T16:42:36Z</ModifiedDate>

               <CreatedDate>2011-08-09T21:17:05Z</CreatedDate>

               <ModifiedById>HRZ780-I5RUE</ModifiedById>

               <CreatedById>HRZ780-I5RUE</CreatedById>

               <ModId>8</ModId>

               <Id>ADSA-96IZCS</Id>

               <CreatedBy>Joanne Brown, 08/09/2011 16:17:05</CreatedBy>

               <ModifiedBy>Joanne Brown, 08/10/2011 11:42:36</ModifiedBy>

            </Contact>

         </ListOfContact>

      </ns:ContactUpdate_Output>

   </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Oracle Web Services On Demand Guide, Version 24.0 (Oracle CRM On Demand Release 36) Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices.