Oracle CRM On Demand Desktop Customization Guide > Adding Custom Fields to Oracle CRM On Demand Desktop > Adding Custom Fields to Oracle CRM On Demand Desktop >

Changing the XML Code in the od_meta_info.xml File


In this procedure, you add the field definition for the new Membership field in the od_meta_info.xml file that contains the data definitions. The field definition must be included in all metadata objects that are being exposed in the example:

  • Contact
  • Account.Contact
  • Opportunity.Contact

NOTE:  The field name used in the <field> element must match the name of the field in the object WSDL (Web Services Description Language). In this example, for the Membership field, the name in the contact custom WSDL is stMembership. So, before adding the element, you must look up and use the field name in the WSDL in Oracle CRM On Demand.

The convention used for WSDL names is as follows:

  • For default Oracle CRM On Demand fields that have not been exposed to Oracle CRM On Demand Desktop, the naming convention is the name of the field without spaces. For example, Account Name, becomes AccountName in the WSDL.
  • For custom fields that you have created in Oracle CRM On Demand, for the WSDL representation of these fields, spaces are replaced with underscores, and a prefix is added to the field name. The prefixes that are used for the field types are listed in Table 2. For example, if you create a field called JVD Text of type Text (Short) on an object, then in the WSDL, this field is called stJVD_Text.
    Table 2. Prefixes and Data Types for Oracle CRM On Demand Field Types
    Field Type
    Prefix
    Data Type

    Checkbox

    b

    DTYPE_BOOL

    Currency

    c

    DTYPE_NUMBER

    Date

    d

    DTYPE_DATE

    Date/Time

    dt

    DTYPE_UTCDATETIME

    Integer

    i

    DTYPE_INTEGER

    Multi-Select Picklist

    mspl

    DTYPE_CSVLIST

    Number

    n

    DTYPE_NUMBER

    Percent

    pc

    DTYPE_NUMBER

    Phone

    ph

    DTYPE_TEXT

    Picklist

    pl

    DTYPE_TEXT

    Text (Long)

    lt

    DTYPE_TEXT

    Text (Short)

    st

    DTYPE_TEXT

To change the XML code in the od_meta_info.xml file

  1. Edit the od_meta_info.xml file, and locate the <object> element.
    • For the Contact object, the <object> element looks similar to the following:

    <object TypeId = "Contact"... >

    • For the Account.Contact object, the <object> element looks similar to the following:

    <object TypeId='Account.Contact' ...>

    • For the Opportunity.Contact object, the <object> element looks similar to the following:

    <object TypeId='Opportunity.Contact' ...>

  2. Add a new <field> element to define the new Membership field in each object:

    <field Name="stMembership" Label="stMembership" DataType="DTYPE_TEXT" />

    The following XML shows the <object> element and the new <field> element in bold font:

    <object TypeId='Account.Contact' Label='Contact' LabelPlural='Contact' ViewMode='Sales Rep' IntObjName='Account' SiebMsgXmlElemName='Contact' SiebMsgXmlCollectionElemName='ListOfContact'>
    <field Name='AccountId' Label='AccountId' DataType='DTYPE_ID' IsRefObjId="yes" RefObjTypeId="Account" RefObjIsParent="yes"/>
    <field Name='AccountLocation' Label='AccountLocation' DataType='DTYPE_TEXT' />
    <field Name='AccountMainPhone' Label='AccountMainPhone' DataType='DTYPE_TEXT' />
    <field Name='AccountName' Label='AccountName' DataType='DTYPE_TEXT' />
    ...
    ...
    <field Name='PrimaryContact' Label='PrimaryContact' DataType='DTYPE_BOOL' />
    <field Name='Role' Label='Role' DataType='DTYPE_TEXT' />
    <field Name='RoleList' Label='RoleList' DataType='DTYPE_TEXT' />
    <field Name="stMembership" Label="stMembership" DataType="DTYPE_TEXT" />
    </object>

    In this sample XML code, the st prefix has been added for the new <field> element, stMembership. Add a prefix to a field only in the od_meta_info.xml file.

  3. Verify your changes, and save the od_meta_info.xml file.
Oracle CRM On Demand Desktop Customization Guide, Version 5.2 Revision A Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices.