- Using an XML editor, open the od_basic_mapping.xml file.
- Locate the <types> element:
<types>
...
...
<type id="Custom Object 1" folder_type="10" display_name="CustomObject1" ver="2">
</type>
</types>
In this example, id="Custom Object 1" is the unique identifier of the mapping definition for Custom Object 1 defined in the od_basic_mapping.xml file.
- Define the new mapping type for Custom Object 1.
For more information on the attributes used with the <type> element, see Type Element of the od_basic_mapping.xml File.
- Define the <form> element inside the <type> element:
<type id="Custom Object 1" folder_type="10" display_name="CustomObject1" ver="2">
<form message_class="IPM.Contact.OnDemand.CustomObject1" display_name="CustomObject1" icon="type_image:Generic:16">OnDemand CustomObject1</form>
</type>
The values for this example are as follows:
- In the following code, define the <custom_views> element:
<type id="Custom Object 1" folder_type="10" display_name="CustomObject1" ver="2">
<form message_class="IPM.Contact.OnDemand.CustomObject1" display_name="CustomObject1" icon="type_image:Generic:16">OnDemand CustomObject1</form>
<custom_views default_name = "#view_od_co1">
<view id="all_customobject1" name ="#view_od_co1"> </view>
</custom_views>
</type>
The <custom_view> element can contain many <view> elements. Similar to the value inside the <form> element in Step 4, the view id attribute value corresponds to the custom view value that is defined in the views.xml file. This example includes a view with the ID value of all_customobject1 which maps to a custom view.
NOTE: The default_name attribute in the <custom_views> element and the name attribute in the <view> element has the following value: #view_od_co1. This label will be defined as a resource in the package_res.xml file.
For information on the attributes in the <custom_view> and <view> tags, see Custom Views Element of the od_basic_mapping.xml File. For information on declaring the custom view in the od_basic_mapping.xml file, see Adding Custom Views in Microsoft Outlook.
- In the following code, map the Name field to a custom Microsoft Outlook field:
<type id="Custom Object 1" folder_type="10" display_name="CustomObject1" ver="2">
...
...
<field id="Name">
<reader>
<mapi_user>
<user_field id="od Name" ol_field_type="1"></user_field>
<convertor>
<string/>
</convertor>
</mapi_user>
</reader>
<writer>
<outlook_user>
<user_field id="od Name" ol_field_type="1"></user_field>
<convertor>
<string/>
</convertor>
</outlook_user>
</writer>
</field>
</type>
This code maps the Name field you already defined in the od_meta_info.xml file to a custom Microsoft Outlook field. For information on the attributes in the <field> tags, see Field Element of the od_basic_mapping.xml File.
Each <field> element describes only one field. In the <field> element, there is a <reader> element and a <writer> element. For information on the <writer> element, see Writer Element of the od_basic_mapping.xml File.
- In the following code, map the Description field to a native Microsoft Outlook field:
<type id="Custom Object 1" folder_type="10" display_name="CustomObject1" ver="2">
...
...
<field id="Description">
<reader>
<mapi_std>
<mapi_tag id="0x3A110000"></mapi_tag>
<convertor>
<string/>
</convertor>
</mapi_std>
</reader>
<writer>
<outlook_std>
<outlook_field id="LastName"></outlook_field>
<convertor>
<string/>
</convertor>
</outlook_std>
</writer>
</field>
</type>
This code maps the Description field you already defined in the od_meta_info.xml file to the Microsoft Outlook field Last Name.
There are differences between this Description field mapping and the Name field mapping described in Step 6. The Name field is mapped to a custom Microsoft Outlook field, and it uses the <user_field> element in the <reader> and <writer> elements. However, because the Description field is mapped to a native Microsoft Outlook field, it uses the <outlook_field> element inside the <writer> element. For more information on Microsoft Outlook fields, see Fields That Oracle CRM On Demand Desktop Uses for the Custom Object. For sample code of a complete mapping definition for Custom Object 1 in the od_basic_mapping.xml file, see XML Code That Maps a Definition for a Custom Object.
- Save and close the od_basic_mapping.xml file.