The many-to-many relationship is a relationship between two primary record types in which the records of each record type can be the parent or child of the other, depending on how you view the relationship; for example, an account can have many contacts. Conversely, a contact can have many accounts. Similarly, for the purposes of these guidelines, Custom Object 1 instances can have many Custom Object 2 instances, and vice-versa.
The only way of identifying many-many relationships is through inspection. The following are the steps you should follow in order to determine if a relationship is a many-to-many relationship:
In order to associate a child record with a parent record, first the child instance must be inserted into CRM On Demand using the child's WSDL. The child can then be associated with the parent by using either the parent's InsertChild (for Web Services v1.0) or Update (for Web Services v2.0) operation; this is done by passing only the child's user key on the Child section of the request XML (see the following example using Web Services v1.0):
<soapenv:Envelope>
<soapenv:Header/>
<soapenv:Body>
<ns:CustomObject1WS_CustomObject1InsertChild_Input>
<data:ListOfCustomObject1>
<data:CustomObject1>
<CustomObject1Id>ALTA-223GKI</CustomObject1Id>
<data:ListOfCustomObject3>
<data:CustomObject3>
<IntegrationId>ALTA-22560D</IntegrationId>
</data:CustomObject3>
</data:ListOfCustomObject3>
</data:CustomObject1>
</data:ListOfCustomObject1>
</ns:CustomObject1WS_CustomObject1InsertChild_Input>
</soapenv:Body>
</soapenv:Envelope>
Child records of a many-to-many relationship can only be updated using the child's WSDL through the Update operation.
Users of the connector need to be aware of the limitations in transacting objects involved in a many-to-many relationship, otherwise the transaction will be likely to fail or an error response will be returned. This can be avoided by making sure the following advice is followed when configuring the CRM On Demand mapping in Oracle Policy Modeling.
Note: the connector does not have explicit validations setup for the following pointers because it is unable to detect different relationship types.
For Oracle CRM On Demand objects in a many-to-many relationship:
- crmodcustomobject3customobject3id
- crmodcustomobject3integrationid
- crmodcustomobject3externalsystemid
Users can verify the Access Level set for the child object/s if errors are still being encountered when inserting or updating child records (after following the pointers above). Related record types access rights are granted or revoked in Step 2 of the Access Profile Wizard.
For more information on configuring Access Levels for Related Record Types, open the Online Help Guide for Oracle CRM On Demand and navigate to Administering Oracle CRM On Demand -> User Management and Access Controls -> Access Profile Management > About Access Levels for Related Record Types.