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

  1. Update the od_meta_info.xml file:
    1. 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'>

    1. 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.

  2. Update the od_basic_mapping.xml file:
    1. 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">

    1. 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.

  3. 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:

    • <field> is the field name from the od_basic_mapping.xml file.
    • <text> is the label resource id attribute from the package_res.xml file.

      The id attribute is the unique identifier of a UI form of a type in the forms_XX.xml file. For example, a contact form definition is as follows:

    <form id="OD Contact">

  4. Update package_res.xml as follows:

    <str key="lbl_never_email">Never Email</str>

Oracle CRM On Demand Desktop Customization Guide, Version 5.2 Revision A Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices.