Bookshelf Home | Contents | Index | PDF |
Oracle Web Services On Demand Guide > Web Services On Demand API Calls > Web Services v2.0 API Calls > InsertInserts a new record in the Oracle CRM On Demand database. UsageYou use the Insert method to create one or more records of a particular object in an Oracle CRM On Demand instance. When inserting a batch of records, the batch is treated as a single transaction. If one record fails to insert during a batch insertion, the entire operation is rolled back and no records are inserted. The Insert method can be used to insert both parent records and child records. If a child node is specified in the request, the Insert method inserts the child and associates it with the existing parent record. If a child node is missing, the Insert call inserts only the new parent record. Insert calls must include values for fields that are required for the object. Fields can be conditionally required, that is they become required if the data specified for other fields on the record meets the criteria defined in an expression for the field. For more information about conditionally-required fields, see Oracle CRM On Demand Online Help. ArgumentsTable 33 describes the arguments taken by the Insert method.
Return Value of the CallThe status key for each of the Oracle CRM On Demand objects. Sample SOAP Request - InsertThe following SOAP request contains two contact records, one of which specifies a parent contact record and one of its child Account records, and the other only specifies a parent contact record. When a child record is included in the request, the parent record must exist in Oracle CRM On Demand and the child record specified is inserted and associated to the existing parent record. When no child record is included in the request, the parent record is inserted. 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. <?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"> <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> <ContactInsert_Input xmlns="urn:crmondemand/ws/ecbs/contact/"> <LOVLanguageMode>LIC</LOVLanguageMode> <ContactFirstName>NewCon2</ContactFirstName> <ContactLastName>Con2</ContactLastName> <ExternalSystemId>12345009</ExternalSystemId> <ContactFirstName>ExistingFirstName</ContactFirstName> <ContactLastName>ExistingLastName</ContactLastName> <AccountName>Action Rentals</AccountName> Sample SOAP ResponseThe following SOAP response contains the returned status keys for the inserted 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"> <ns:ContactInsert_Output xmlns:ns="urn:crmondemand/ws/ecbs/contact/"> <ListOfContact xmlns="urn:/crmondemand/xml/Contact/Data"> <ModifiedDate>2011-08-10T14:44:24Z</ModifiedDate> <CreatedDate>2011-08-10T14:44:24Z</CreatedDate> <ModifiedById>HRZ780-I5RUE</ModifiedById> <CreatedById>HRZ780-I5RUE</CreatedById> <CreatedBy>Joanne Brown, 08/10/2011 09:44:24</CreatedBy> <ModifiedBy>Joanne Brown, 08/10/2011 09:44:24</ModifiedBy> <ModifiedDate>2011-08-10T14:41:55Z</ModifiedDate> <CreatedDate>2011-08-09T21:17:05Z</CreatedDate> <ModifiedById>HRZ780-I5RUE</ModifiedById> <CreatedById>HRZ780-I5RUE</CreatedById> <CreatedBy>Joanne Brown, 08/09/2011 16:17:05</CreatedBy> <ModifiedBy>Joanne Brown, 08/10/2011 09:41:55</ModifiedBy> <ModifiedDate>2011-08-10T14:44:27Z</ModifiedDate> <CreatedDate>2011-08-10T14:44:27Z</CreatedDate> <ModifiedById>HRZ780-I5RUE</ModifiedById> <CreatedById>HRZ780-I5RUE</CreatedById> <CreatedBy>Joanne Brown, 08/10/2011 09:44:27</CreatedBy> |
Oracle Web Services On Demand Guide, Version 20.0 (Oracle CRM On Demand Release 32) | Copyright © 2016, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |