Oracle CRM On Demand Desktop Customization Guide > Adding Custom Fields to Oracle CRM On Demand Desktop >
Adding Check Boxes to a Form
This topic describes how to display a check box on an Oracle CRM On Demand Desktop form. In this example, you add a Never Email check box to the UI form. In this procedure, you update the following metadata files:
- od_meta_info.xml
- od_basic_mapping.xml
- forms_12.xml
- package_res.xml
For information on the contents of these files, see About the Metadata Files Updated During Customization. To add a check box to a form
- Update the od_meta_info.xml file:
- Locate the <object> element by TypeId, for example, for a contact it is similar to the following:
<object TypeId='Contact' Label='#obj_contact' LabelPlural='#obj_contact_plural'>
- Add a new <field> element to define the field, as follows:
<field Name='NeverEmail' Label='NeverEmail' DataType='DTYPE_BOOL' />
In this code, DataType is the type of the field. For check boxes or other Boolean fields, set DataType to DTYPE_BOOL. TypeID is the unique identifier of a type in the od_meta_info.xml file. When a type is defined, then the name is specified by the TypeId attribute.
- Update the od_basic_mapping.xml file:
- Locate the <object> element by the id attribute, for example, for a contact it is similar to the following:
<type id="Contact" predefined_folder="10" ver="2">
- Add a new <field> element to define the mapping as follows:
<field id="NeverEmail"> <reader> <mapi_user> <user_field id="od NeverEmail" ol_field_type="6"></user_field> <convertor> <bool/> </convertor> </mapi_user> </reader> <writer> <outlook_user> <user_field id="od NeverEmail" ol_field_type="6"></user_field> <convertor> <bool/> </convertor> </outlook_user> </writer> </field>
The id attribute is the unique identifier of a type in the od_basic_mapping.xml file. When a type is defined, then the name is specified by the id attribute.
- Update the forms_12.xml file by locating the object form, using the id attribute, and adding the code for check box control as follows:
<cell size="22"> <checkbox id="NeverEmail" tab_order="33"> <field>NeverEmail</field> <text>#lbl_never_email</text> </checkbox> </cell>
where:
<form id="OD Contact">
- Update package_res.xml as follows:
<str key="lbl_never_email">Never Email</str>
|