Example of Using the Insert Method
If you use the Insert method with the example of the integration object instance represented in XML that follows, then a new service request is created with two activities.
<?xml version = "1.0" encoding = "UTF-8"?>
<?Siebel-Property-Set EscapeNames="false"?>
<SiebelMessage MessageId = "1-2R6E" IntObjectName = "Sample Service Request"
MessageType = "Integration Object" IntObjectFormat = "Siebel Hierarchical">
<ListOfSampleServiceRequest>
<ServiceRequest>
<Account>Genesys Communications</Account>
<AccountLocation>San Francisco, CA</AccountLocation>
<Area>Network</Area>
<ClosedDate/>
<CommitTime/>
<ContactBusinessPhone>4155551100</ContactBusinessPhone>
<ContactLastName>Kastrup-Larsen</ContactLastName>
<Description>Setting up Router services<Description>
<Priority>3-Medium</Priority>
<SRNumber>1-MYUNIQUEVALUE</SRNumber>
<ServiceRequestType>External</ServiceRequestType>
<ListOfAction>
<Action>
<BillableFlag>N</BillableFlag>
<Description2>test activity1</Description2>
<EstWorkTimeRemaining>8</EstWorkTimeRemaining>
<Planned/>
<PrimaryOwnedBy>SADMIN</PrimaryOwnedBy>
<RowStatusOld>N</RowStatusOld>
<Status>Unscheduled</Status>
<Type>Appointment</Type>
</Action>
<Action>
<BillableFlag>N</BillableFlag>
<Description2>test activity2</Description2>
<EstWorkTimeRemaining>8</EstWorkTimeRemaining>
<Planned/>
<PrimaryOwnedBy>SADMIN</PrimaryOwnedBy>
<Status>Unscheduled</Status>
<Type>Appointment</Type>
</Action>
</ListOfAction>
</ServiceRequest>
</ListOfSampleServiceRequest>
</SiebelMessage>
For this example to work, you must have the contact, Kastrup-Larsen, in the database. If you try the Insert method against a server database where the contact does not exist, then you will receive the following error:
Picklist validation of field 'Contact Last Name' in integration component 'Service
Request' did not find any matches satisfying the query '[Last Name] = "Kastrup-
Larsen"', and an attempt to create a new record through the picklist failed (SBL-
EAI-04186)
Also, if you try to insert the previous instance a second time, then you will receive the following error message:
IDS_ERR_EAI_SA_INSERT_MATCH_FOUND. Insert operation on integration component
'Service Request' failed because a matching record in business component 'Service
Request' with search specification '[SR Number] = "1-MYUNIQUEVALUE" was found.(SBL-
EAI-04383).