Oracle CRM On Demand Desktop Customization Guide > Adding Custom Fields to Oracle CRM On Demand Desktop >
Adding a Picklist Field in Oracle CRM On Demand Desktop
This topic shows how to add a picklist field to the Contact object type. Before You Begin
Review the chapter on customization in Oracle CRM On Demand Desktop Administration Guide. In this procedure, you update the following metadata files:
- od_meta_info.xml
- od_basic_mapping.xml
- forms_12.xml
For information on the contents of these files, see About the Metadata Files Updated During Customization. To add a picklist to the Contact object type
- Define the objects and fields to synchronize with Oracle CRM On Demand as follows:
- Use an XML editor to open the od_meta_info.xml file.
- In the od_meta_info.xml file, locate the following element:
<object TypeId='Contact' ...>
The <object> element contains several child <field> elements. These child elements define the fields in the Contact object.
- Add the following <field> element as a child of the <object TypeId='Contact' ...> element:
<field Name="ContactType" Label="Contact Type" DataType="DTYPE_TEXT" HasPicklist="yes" CRMName="Contact Type" />
In this example, ContactType is the exact field name that is used in SOAP queries.
- Save and close the od_meta_info.xml file.
- Map the picklist field from the Contact object in the Oracle CRM On Demand database to a field in Oracle CRM On Demand Desktop as follows:
- Use an XML editor to open the od_basic_mapping.xml file.
- In the od_basic_mapping.xml file, locate the following element:
<type id="Contact" ...>
The <object> element contains several child <field> elements. These child elements define the fields in the Contact object.
- Add the following <field> element as a child element of the <object TypeId='Contact' ...> element:
<field id="ContactType"> <reader> <mapi_user> <user_field id="od ContactType" ol_field_type="1"></user_field> <convertor> <string/> </convertor> </mapi_user> </reader> <writer> <outlook_user> <user_field id="od ContactType" ol_field_type="1"></user_field> <convertor> <string/> </convertor> </outlook_user> </writer> </field>
- Create a new object type for the picklist.
To create a new object type for the picklist, you must use the following format for the value of the id attribute of the <type> element:
<type id="object_namefield_namePicklist">
where:
<type id = "ContactContactTypePicklist" icon = "type_image:Generic:16"> <field id = "Label"> <type> <simple type = "string"/> </type> </field> <field id = "Value"> <type> <simple type = "string"/> </type> </field> <field id = "SortOrder"> <type> <simple type = "integer"/> </type> </field> <field id = "IsDefault"> <type> <simple type = "boolean"/> </type> </field> <field id = "ParentCode"> <type> <simple type = "string"/> </type> </field> </type>
- Customize the picklist control on the form layout by adding the following code in forms_12.xml in the vertical stack, as an example:
<cell size="22"> <combobox id="ContactType" tab_order="16"> <items format=":[:(Label):]" value_column="Value" has_null_item="false"> <source type="auto" name="ContactContactTypePicklist"/> <order_by> <order ascend="true">SortOrder</order> </order_by> </items> <field>ContactType</field> </combobox> </cell>
where:
|