Oracle CRM On Demand Desktop Administration Guide > Customizing Oracle CRM On Demand Desktop > Performing Typical Customization Work >

Example of Displaying a Custom Oracle CRM On Demand Field in an Oracle CRM On Demand Desktop Form


This topic gives one example of how to display a custom Oracle CRM On Demand field in an Oracle CRM On Demand Desktop form. You might use this feature differently, depending on your business model. In this example, you display the Mail Stop field on the Contact form in Oracle CRM On Demand Desktop. You make this field available through Oracle CRM On Demand and then customize Oracle CRM On Demand Desktop to synchronize and display the field. You modify the following files:

  • od_meta_info.xml
  • od_basic_mapping.xml
  • forms_12.xml
  • package_res.xml

For more information, see Files in the Customization Package.

To display a custom Oracle CRM On Demand field in an Oracle CRM On Demand Desktop form

  1. Define the objects and fields to synchronize:
    1. Use an XML editor to open the od_meta_info.xml file.

      For more information, see Files in the Customization Package.

    2. In the od_meta_info.xml file, locate the following element:

    object TypeId='Contact'

    Several child field tags reside in the object TypeId='Contact' element. These children define the fields for the Contact object.

    1. Add the following field element as a child to the object TypeId='Contact' element:

    <field Name='Mail Stop' Label='Mail Stop' DataType='DTYPE_TEXT' IOElemName='MailStop' />

    1. Repeat Step b and Step c for the following element:

    object TypeId='Account.Contact'

    1. Repeat Step b and Step c for the following element:

    object TypeId='Opportunity.Contact'

    1. Save and close the od_meta_info.xml file.
  2. Map the Mail Stop field from the Contact object in the Oracle CRM On Demand database to a field in Oracle CRM On Demand Desktop:
    1. Use an XML editor to open the od_basic_mapping.xml file.

      For more information, see Files in the Customization Package.

    2. In the od_basic_mapping.xml file, add a new field element to the type element, using values from the following table.
      Element
      Value

      type id

      Contact

    3. Add the following code to the element you created in Step b.

    <field id="Mail Stop">
       <reader class="mapi_user">
          <user_field id="od Mail Stop" ol_field_type="1"></user_field>
          <convertor class="string"></convertor>
       </reader>
       <writer class="Microsoft Outlook_user">
          <user_field id="od Mail Stop" ol_field_type="1"></user_field>
          <convertor class="string"></convertor>
       </writer>
    </field>

    1. Save and close the od_basic_mapping.xml file.
  3. Insert a label and the Mail Stop field just below the Job Title field on the Contact form:
    1. Open the forms_12.xml file, and then locate the cell that contains the #lbl_job_title label control.
    2. Insert the following XML code immediately after the cell that contains the #lbl_job_title label control:

    <cell size="22">
       <static id="lbl_MailStop" tab_order="6">
          <text>#lbl_mail_stop</text>
       </static>
    </cell>

    The text #lbl_mail_stop specifies a key that the package_res.xml file uses to determine the localized value for the label.

    1. Locate the section that is labeled with the left side fields comment.

      This section resides in the element that resides in the form that contains the OD Contact ID.

    2. To add the text field control, insert the following XML code immediately above the cell that contains the ContactToAccount MVG control, and just below the cell that contains the status_image control:

    <cell size="22">
       <edit id="MailStop" tab_order="7">
          <field value="string">Mail Stop</field>
       </edit>
    </cell>

    1. Locate the cell size element, and then change its value to the following:

    <cell size="185">

    To make room for the new field, you must increase the size of the cell that houses all of the child objects. In this example, you change the cell size from 155 to 185.

  4. Add the following code to the package_res.xml file:

    <str key="lbl_mail_stop">Mail stop:</str>

    Add this code as a child of the res_root element under the <!-Contact Form comment.

    This code provides localized values and images to the Oracle CRM On Demand Desktop client. This code allows the Contact form to render the Mail Stop label through a key value. The package_res.xml file provides localized values and images to Oracle CRM On Demand Desktop. Because you added the new Mail Stop field to the Contact form, you must provide the text for the label. When you modified the forms_12.xml file, you created a label control that contains #lbl_mail_stop for the text value. This control identifies the key to use in the package_res.xml file.

  5. Republish the updated package files.

    During the next synchronization, Oracle CRM On Demand Desktop uses the updated files to apply the modifications to the Contact form. The Mail Stop field is available on the Contact form and Oracle CRM On Demand Desktop synchronizes the values in this field with the Oracle CRM On Demand Desktop server. For more information, see Publishing or Unpublishing Customization Packages.

Oracle CRM On Demand Desktop Administration Guide, Version 5.2 Copyright © 2017, Oracle and/or its affiliates. All rights reserved. Legal Notices.