Specifying the Many-To-Many Relationships

You do not specify many-to-many relationships in Creating the Custom Object. A many-to-many relationship exists between contacts and activities, and between employees and activities. You must specify more objects that contain links to activity and contact, or activity and employee. The remaining description for a many-to-many relationship is the same as for other objects where you specify the object name and object fields. This object can also include a field that indicates if this intersection record is a primary record or not a primary record.

You must specify the Microsoft Outlook folder that stores these objects. For this example, it is not desirable to display Opportunity and Channel Partner objects to the user. You use a hidden folder in Outlook that you specify in the code as the following:

predefined_folder="1"

To specify the many-to-many relationships

  1. Use an XML editor to open the siebel_basic_mapping.xml.

  2. Siebel CRM Desktop does not require a form to display these objects, so you do not define a form. Instead, you add the following code:

    <type id="Opportunity.Channel_Partner.Association" hidden_folder="true" 
    folder_type="10" display_name="OCHP">
    <form message_class="IPM.Contact.SBL.OpportunityChannel_PartnerAssociation" 
    display_name="OpportunityChannel_PartnerAssociation" 
    icon="type_image:Generic:16"></form>
      <field id="OpportunityId">
        <reader>
          <mapi_user>
            <user_field id="sbl OpportunityId" ol_field_type="1"></user_field>
            <convertor><binary_hexstring/></convertor>
            </mapi_user>
        </reader>
        <writer>
          <Outlook_user>
            <user_field id="sbl OpportunityId" ol_field_type="1"></user_field>
            <convertor><binary_hexstring/></convertor>
          </Outlook_user>
        </writer>
        </field>
          <field id="ChannelPartnerId" ver="2">
        <reader>
          <mapi_user>
            <user_field id="sbl ChannelPartnerId" ol_field_type="1"></user_field>
          <convertor><binary_hexstring/></convertor>
          </mapi_user>
        </reader>
        <writer>
          <multiwriter>
            <Outlook_user>
              <user_field id="sbl ChannelPartnerId" ol_field_type="1"></user_field>
          <convertor><binary_hexstring/></convertor>
            </Outlook_user>
              <link_fields>
                <field from="Name" to="PartnerName"></field>
                <field from="Location" to="PartnerLocation"></field>
              </link_fields>
          </multiwriter>
        </writer>
        </field>
          <field id="PartnerName">
        <reader>
          <mapi_user>
            <user_field id="sbl PartnerName" ol_field_type="1"></user_field>
            <convertor><string/></convertor>
          </mapi_user>
        </reader>
        <writer>
          <Outlook_user>
            <user_field id="sbl PartnerName" ol_field_type="1"></user_field>
            <convertor><string/></convertor>
          </Outlook_user>
        </writer>
        </field>
          <field id="PartnerLocation">
        <reader>
          <mapi_user>
            <user_field id="sbl PartnerLocation" ol_field_type="1"></user_field>
            <convertor><string/></convertor>
          </mapi_user>
        </reader>
        <writer>
          <Outlook_user>
            <user_field id="sbl PartnerLocation" ol_field_type="1"></user_field>
            <convertor><string/></convertor>
          </Outlook_user>
        </writer>
      </field> 
    </type>