Limitation for Many-to-Many relationships

What is a Many-to-Many relationship?

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.

How do we identify Many-to-Many relationships?

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:

Determine the access level available for the Parent-to-Child object association.

  1. Identify the Parent and Child objects whose relationship you would like to determine; for example, parent = Custom Object 1 and child = Custom Object 2.
  2. Go to the Access Profiles page in your CRM On Demand instance, by navigating to Admin -> User Management and Access Controls -> Access Profiles.
  3. Inside Access Profiles, click on the Edit link next to the Access Profile name assigned to the role of your user.
  4. Inside the Access Profile wizard, click on Step 2 Specify Access Levels and then click on the Related Information link beside the name of the parent object (for example, Custom Object 1).
  5. On the Related Information page, take note of all of the available Access Levels of the associated Child object (for example, Custom Object 3: Read/Create, Read-Only, View, No Access).


Determine the relationship type based on the available Parent-to-Child relationship Access Levels.

  1. Open the Online Help Guide for Oracle CRM On Demand by opening your CRM On Demand instance and clicking on the Help link located on the upper-right hand side of the page.
  2. Once in the online help, navigate to Administering Oracle CRM On Demand -> User Management and Access Controls -> Access Profile Management -> About Access Levels for Related Record Types.
  3. In this section, the Access Levels available for each relationship type are outlined; we can therefore deduce the Relationship type (for example, many-to-many) based on the access-level options of the related record.

What limitations do we have for Many-to-Many object relationship transactions?

Insert Child records

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>    

Update Child records

Child records of a many-to-many relationship can only be updated using the child's WSDL through the Update operation.

How does this affect the behavior of the connector?

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:

  1. crmodcustomobject3customobject3id
  2. crmodcustomobject3integrationid
  3. crmodcustomobject3externalsystemid

Troubleshooting

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.