12XML Files Reference

Example Code of the od_basic_mapping.xml File

This topic gives one example of code that Oracle CRM On Demand Desktop uses in the od_basic_mapping.xml file. You might use this feature differently, depending on your business model. The following code is an example of the od_basic_mapping.xml file:

<?xml version="1.0" encoding="utf-8"?>
<sd2_meta>
   <types>
      <type id="Contact" predefined_folder="10">
         <form message_class="IPM.Contact.OnDemand.Contact" 
icon="type_image:Contact:16" large_icon="type_image:Contact:32" 
display_name="Contact">OnDemand Contact</form>
         <alt_messageclasses>
            <alt_messageclass ext="Private" display_name="Private Contact" 
icon="type_image:Contact.Private:16" 
large_icon="type_image:Contact.Private:32">OnDemand Contact</alt_messageclass>
            </alt_messageclasses>
            <custom_views default_name="#view_crm_and_personal_contacts">
               <view id="all_contacts" name="#view_crm_and_personal_contacts"></view>
            </custom_views>
             <field id=" First Name ">
                <reader class="mapi_std">
                   <mapi_tag id="0x3A060000"></mapi_tag>
                    <convertor class="string"></convertor>
                </reader>
                <writer class="Microsoft Outlook_std">
                     <Microsoft Outlook_field id=" FirstName "></Microsoft Outlook_field>
                     <convertor class="string"></convertor>
                 </writer>
             </field>
             <field id="Location">
                 <reader class="mapi_user">
                    <user_field id="od Location" ol_field_type="1"></user_field>
                    <convertor class="string"></convertor>
                 </reader>
                 <writer class="Microsoft Outlook_user">
                    <user_field id="od Location" ol_field_type="1"></user_field>
                    <convertor class="string"></convertor>
                 </writer>
              </field>
      </type>
   </types>
</sd2_meta>

    Type Element of the od_basic_mapping.xml File

    The type element defines the Oracle CRM On Demand object that Oracle CRM On Demand Desktop maps to Microsoft Outlook. Oracle CRM On Demand Desktop includes the following attributes in the type element:

    • id. Defines the ID or name of the Oracle CRM On Demand object that Oracle CRM On Demand Desktop maps to Microsoft Outlook.

    • display_name. Defines the name of the folder that Oracle CRM On Demand Desktop displays in the Microsoft Outlook tree view that Oracle CRM On Demand Desktop uses to store the records of the Oracle CRM On Demand object.

    • folder_type. Defines the type of the Microsoft Outlook folder. The value for the folder_type attribute is typically 10 for a custom Oracle CRM On Demand object.

    • hidden_folder. Determines if the folder that the display_name attribute specifies is visible in the Microsoft Outlook tree view.

    • predefined_folder. Defines the type of Microsoft Outlook folder. If you must store Oracle CRM On Demand objects in a native Microsoft Outlook folder, then Oracle CRM On Demand Desktop uses the predefined_folder attribute.

    • prohibit_user_modification. Prohibits the modification to an object that is declared in the type element. The default value is False.

    • ver. Used during development. Oracle CRM On Demand Desktop does not apply any change to the description for the object that the ID attribute defines until the value of the ver attribute is increased.

      Form Element of the od_basic_mapping.xml File

      The form element defines the ID of the form that Oracle CRM On Demand Desktop uses to display the object that is defined in the type element. The form with the corresponding ID is described in the forms_xx.xml file. For more information, see XML Code to Customize Forms.

      Oracle CRM On Demand Desktop includes the following attributes in the form element:

      • message_class. Defines the Microsoft Outlook message class for the form. The message class is an extension of native Microsoft Outlook message classes, for example, IPM.Contact.OnDemand.Contact, or IPM.Contact.OnDemand.Account.

      • icon. Defines the icon that Oracle CRM On Demand Desktop uses to display the following objects:

        • The object that is defined in the type element in a Microsoft Outlook table view.

        • The icon views for small icons and list view modes.

        • A form caption icon, which displays in the top-left corner in front of the form caption. Oracle CRM On Demand Desktop stores icons in the platform_images.xml file. The value of the icon attribute must be the key value of the required image.

      • large_icon. Defines the icon to use to represent the object that is defined in the type element when the user uses the large icons mode. Oracle CRM On Demand Desktop stores icons in the platform_images.xml file. The value of the large_icon attribute must be the key value of the necessary image.

      • display_name. Defines the name that Oracle CRM On Demand Desktop displays on the form caption.

        Alt Message Classes Element of the od_basic_mapping.xml File

        To define an alternative message class to an object in Microsoft Outlook, you can use the alt_messageclasses element. This element is useful if an Oracle CRM On Demand object might be in one of several different states. For example, a contact might be shared or not shared.

        This element must contain a set of alt_messageclass tags that define each state of an object. The alt_messageclass element can also define a form that you use for an object with this message class. In this way, you can use different forms for the same object but in different states. Each alt_messageclass element includes the following attributes:

        • Ext. Indicates an extension that is added to an original message class.

        • display_name. The same as the message_class element.

        • icon. The same as the message_class element.

        • large_icon. The same as the message_class element.

          Custom Views Element of the od_basic_mapping.xml File

          The custom_views element defines a set of custom Microsoft Outlook views that Oracle CRM On Demand Desktop applies for the object that is defined in the type element. The default_name attribute sets the default view that Oracle CRM On Demand Desktop applies after the installation.

          Oracle CRM On Demand Desktop includes the following tags in the custom_views element:

          • view. Describes each view. Each view element includes the following attributes:

            • id. Defines the ID of the view. The view is described in the views.xml file.

            • name. Defines the name of the view that is specified in the id attribute to display in the Current view menu. To access this menu in Microsoft Outlook, the user chooses the View menu, Arrange By, and then the Current view menu.

            The following code is an example of the custom_views element:

            <custom_views default_name="All Activities">
               <view id="all_activities" name="All Activities"></view>
               <view id="all_activities_by_duedate" name="Activities by Due Date"></view>
               <view id="all_activities_by_owner" name=" Activities by Owner"></view>
               <view id="all_activities_by_priority" name="Activities by Priority"></view>
            </custom_views>
            

            Field Element of the od_basic_mapping.xml File

            The field element describes the field mapping. Because the field element describes one field, the number of field tags must be the same as the number of fields that are mapped. The following attributes are included in the field element:

            • id. Defines the field identifier, for example, the API name of the field. To assign a control to this field on a form, Oracle CRM On Demand Desktop also uses the value of this attribute in the forms_xx.xml file.

            • ver. Used during development. Oracle CRM On Demand Desktop does not apply any change to the field description until the value of the ver attribute is increased.

              Writer Element of the od_basic_mapping.xml File

              The writer element defines write access to the field that Oracle CRM On Demand Desktop maps to Microsoft Outlook. It contains only the class attribute. The following values are available for the class attribute:

              • binhex_link

              • custom:links_first

              • multiwriter

              • Microsoft Outlook_document_content

              • Microsoft Outlook_document_filename

              • Microsoft Outlook_recipients

              • Microsoft Outlook_std

              • Microsoft Outlook_user

              The writer element can contain the following tags:

              • link_writer

              • resolved_writer

              • Microsoft Outlook_field

              • user_field

              • convertor

              • writer

                XML Code to Map a Field in DB_FACADE storage

                For objects that use DB FACADE storage, the mapping of a field is different and has the following structure:

                <database>
                   <types>
                      <type id="Currency" icon="type_image:Currency:16">
                         <field id="Name">
                            <type>
                               <simple type="string" />
                            </type>
                         </field>
                      </type>
                   </types>
                </database>
                

                The following attributes must be defined for the <type> element:

                • id. Defines the ID or name of the Oracle CRM On Demand object that Oracle CRM On Demand Desktop maps to when DB FACADE storage is used.

                • icon. Defines the image used to accompany an object's records in a list. The id attribute for the <field> element defines the ID or name of the Oracle CRM On Demand object's field.

                The type attribute for <simple> element defines the type of the Oracle CRM On Demand object's field. The type attribute can have the following values for corresponding data types, for example, string for a string data type:

                • string

                • integer

                • double

                • boolean

                • datetime

                For the ID fields, that is, the fields used in links, the following construction exists, and you must use this construction when a field contains a link to the object placed in DB FACADE storage.

                <field id="Primary Employee Id">
                   <type>
                      <foreign_key>
                         <type_id>Employee</type_id>
                      </foreign_key>
                    </type> 
                </field>
                

                However, when a field contains a link to the object placed in Outlook storage, use the following construction:

                <field id="Primary Contact Id">
                   <type>
                      <simple type="binary" />
                   </type>
                </field>
                

                XML Code to Customize the Data That Oracle CRM On Demand Desktop Deletes If You Remove Oracle CRM On Demand Desktop

                This topic gives one example of code that Oracle CRM On Demand Desktop uses in the platform_configuration.xml file. You might use this feature differently, depending on your business model. For more information, see Specifying Which Data Oracle CRM On Demand Desktop Removes from Microsoft Outlook.

                The following code is an example of the platform_configuration.xml file:

                <platform> 
                <items_remover> 
                <rules> 
                   <type id="Mail" rule="skip" /> 
                   <type id="Task" rule="skip" /> 
                   <type id="Event" rule="skip" /> 
                   <type id="Action" rule="script" language="JScript"> 
                   <![CDATA[ 
                   
                                  //"Calendar and Activities";
                                  //"To Do and Activities";
                                  //"Activities Only";
                                  var pim_id = item.PIMObjectId;
                                  if (!item["Appt PIM Flag"] && pim_id != null)
                                  {
                                     var pim_item = open_item(pim_id);
                                     if (pim_item != null)
                                        pim_item.remove();
                                  }
                   
                               true;   // allow to process this item
                            
                   ]]> 
                   </type> 
                </rules> 
                </items_remover> 
                </platform>
                

                Example Code for the connector_configuration.xml File

                This topic gives one example of code that Oracle CRM On Demand Desktop uses in the connector_configuration.xml file. You might use this feature differently, depending on your business model. The following code is an example of the connector_configuration.xml file:

                <root>
                   <types>
                      <type id="Opportunity">
                         <view label="Opportunity" label_plural="Opportunities" 
                small_icon="type_image:Opportunity:16" normal_icon="type_image:Opportunity:24" 
                large_icon="type_image:Opportunity:48"></view>
                         <synchronizer name_format=":[:(Name):]">
                            <links>
                               <link>Account Id</link>
                                <link>Currency Code</link>
                            </links>
                            <natural_keys>
                               <natural_key>
                                  <field>Name</field>
                               </natural_key>
                            </natural_keys>
                         </synchronizer>
                      </type>
                   </types>
                   <filter_presets>
                      <preset name="Test filters">
                         <type id="Action">
                            <group link="and">
                               <binary field="Planned" condition="ge">
                                  <value type="function">today</value>
                               </binary>
                            </group>
                         </type>
                      </preset>
                   </filter_presets>
                </root>
                

                  Types Element of the connector_configuration.xml File

                  The types element describes the types of objects to synchronize. It does not contain attributes. It does contain a set of type tags. You must describe these types in the od_basic_mapping.xml file.

                    Type Element of the connector_configuration.xml File

                    The type element describes the type to synchronize. You must describe it in the od_basic_mapping.xml file. It includes the id attribute, which defines the ID of the object.

                    The type element must contain the following tags:

                    • view

                    • synchronizer

                      View Element of the connector_configuration.xml File

                      The view element defines the type in the user interface, in particular, the Filter Records tab on the Synchronization Control Panel dialog box.

                      The view element includes the following attributes:

                      • label. The label that Oracle CRM On Demand Desktop uses to display this object in the Synchronization Control Panel dialog box if Oracle CRM On Demand Desktop cannot resolve the name of this object.

                      • label_plural. The label that Oracle CRM On Demand Desktop uses to display this object in the Synchronization Control Panel dialog box if the label is most appropriately displayed in the plural form.

                      • small icon. Defines a 16-by-16 pixel icon that Oracle CRM On Demand Desktop uses for this object on the Synchronization Control Panel dialog box.

                      • normal_icon. Defines the icon that Oracle CRM On Demand Desktop displays next to the object type in the Filter Records tab of the Synchronization Control Panel dialog box.

                      • large_icon. Defines the icon that Oracle CRM On Demand Desktop displays on the Oracle CRM On Demand Desktop Synchronization dialog box while Oracle CRM On Demand Desktop synchronizes this type of object.

                      • suppress_sync_ui. If suppress_sync_ui is true, then this attribute hides the object of this type from the Filter Records tab of the Synchronization Control Panel dialog box. If suppress_sync_ui is not defined, then Oracle CRM On Demand Desktop applies the false value by default.

                      For more information, see Controlling the Object Types That Oracle CRM On Demand Desktop Displays inthe Filter Records Tab.

                        Synchronizer Element of the connector_configuration.xml File

                        The synchronizer element describes more settings for synchronization. It defines attributes that the synchronization engine requires. For example, relations between objects or criteria to identify duplicate objects.

                        The synchronizer element includes the name_format attribute, which defines the format of the output string for objects of this type. Oracle CRM On Demand Desktop uses this string if objects of this type are displayed on the Check Issues, Resolve Conflicts, Resolve Duplicates, or Confirm Synchronization tab of the Control Panel in the Oracle CRM On Demand Desktop application.

                        The synchronizer element can contain the following tags:

                        • links

                        • natural_keys

                          Natural Key Element of the connector_configuration.xml File

                          The natural_key element is defined in the synchronizer element. You use it to configure criteria to identify duplicated records during synchronization. The natural_key element contains the following:

                          • A set of natural_key tags that describes the criteria. Oracle CRM On Demand Desktop uses OR logic for all criteria that the natural_key element describes.

                          • A set of field tags, each of which contains a field name that Oracle CRM On Demand Desktop examines to identify duplicates. Oracle CRM On Demand Desktop uses AND logic for all field tags.

                            Example Code of the Natural Key Element

                            The following code is an example of the natural_keys element:

                            <natural_keys>
                               <natural_key>
                                  <field>First Name</field>
                                  <field>Last Name</field>
                               </natural_key>
                               <natural_key>
                                  <field>Email Address</field>
                               </natural_key>
                            </natural_keys>
                            

                            In this code, two objects are detected as duplicates if one of the following situations is true:

                            • First Name AND Last Name contain the same values

                            • Email Address fields contain the same values

                              Filter Presets Element of the connector_configuration.xml File

                              The filter_presets element contains predefined filter criteria. The preset element describes these criteria. The preset element includes a single attribute, name, which defines the name for these criteria. The preset element contains a set of type tags that define filter criteria for each type.

                              The type element defines the object type to which Oracle CRM On Demand Desktop applies this filter criteria. You must define the object type in the id attribute of this element. The group element describes a group of criteria.

                                Example Code of the Filter Presets Element

                                The following code is an example of the usage of the filter_presets element of the connector_configuration.xml file:

                                <filter_presets>
                                   <preset name="Test filters">
                                      <type id="Opportunity">
                                         <group link="and">
                                            <binary field="Status" condition="in">
                                               <value type="array">
                                                  <value type="string">Accepted</value>
                                                  <value type="string">Pending</value>
                                                  <value type="string">Rejected</value>
                                                  <value type="string">Rerouted</value>
                                               </value>
                                            </binary>
                                         </group>
                                      </type>
                                      <type id="Action">
                                         <group link="and">
                                            <binary field="Planned" condition="ge">
                                               <value type="function">today</value>
                                            </binary>
                                         </group>
                                      </type>
                                   </preset>
                                </filter_presets>
                                

                                  Example Code to Set the Size and Type of Field

                                  This topic describes code you can use to set the size and type of field. The following code is an example usage of the group element of the connector_configuration.xml file to set the size and type of field:

                                  <group link="and">
                                     <binary field="FileSize" condition="le">
                                        <value type="integer">5242880</value>
                                     </binary>
                                     <group link="or">
                                        <binary field="FileExt" condition="eq">
                                           <value type="string">doc</value>
                                        </binary>
                                        <binary field="FileExt" condition="eq">
                                           <value type="string">docx</value>
                                        </binary>
                                        <binary field="FileExt" condition="eq">
                                           <value type="string">xls</value>
                                        </binary>
                                        <binary field="FileExt" condition="eq">
                                           <value type="string">xlsx</value>
                                        </binary>
                                        <binary field="FileExt" condition="eq">
                                           <value type="string">msg</value>
                                        </binary>
                                        <binary field="FileExt" condition="eq">
                                           <value type="string">txt</value>
                                        </binary>
                                        <binary field="FileExt" condition="eq">
                                           <value type="string">rtf</value>
                                        </binary>
                                        <binary field="FileExt" condition="eq">
                                           <value type="string">html</value>
                                        </binary>
                                        <binary field="FileExt" condition="eq">
                                           <value type="string">ppt</value>
                                        </binary>
                                        <binary field="FileExt" condition="eq">
                                           <value type="string">pptx</value>
                                        </binary>
                                        <binary field="FileExt" condition="eq">
                                           <value type="string">pdf</value>
                                        </binary>
                                        <binary field="FileExt" condition="eq">
                                           <value type="string">mht</value>
                                        </binary>
                                        <binary field="FileExt" condition="eq">
                                           <value type="string">mpp</value>
                                        </binary>
                                        <binary field="FileExt" condition="eq">
                                           <value type="string">vsd</value>
                                        </binary>
                                     </group>
                                  </group>
                                  

                                    Form Element of the forms_xx.xml File

                                    The form element describes the user interface for each custom Microsoft Outlook form. It can include the following attribute: id. It defines the unique name for the current form.

                                    Standard code is present in the <script> element, which defines the form handler. An example of this is "contact_note() in the provided code. The form handler must be declared in forms.js file.

                                    The form element contains the following tags:

                                    • script

                                    • info_bar

                                    • page

                                    Each of these tags describe a specific part of the form. You can ignore each element.

                                      Example Code of the Form Element

                                      The following code is an example of the form element.

                                      This code defines the Contact Note form:

                                      <forms>
                                         <form id="OD Contact Note" >
                                            <script>
                                               <![CDATA[
                                                  include("forms.js", "forms");
                                                  var ctx = {
                                                     "application": application,
                                                      "ui": ui,
                                                       "application_script": application_script,
                                                        "form": form
                                                  };
                                                  var current_form = new forms.contact_note(forms.create_form_ctx(ctx));
                                               ]]>
                                            </script>
                                            <page id="General" tag="0x10A6" min_height="155" min_width="520">
                                               <cell>
                                                  <stack layout="vert" padding="5">
                                                     <cell>
                                                        <stack layout="horz" spacing="3">
                                                           <cell size="65">
                                                              <stack layout="vert" spacing="5">
                                                                 <cell size="22">
                                                                     <static id="0x20004" tab_order="2"> 
                                                                       <text>#lbl_type</text>
                                                                    </static> 
                                                                 </cell>
                                                                 <cell size="22">
                                                                    <static id="0x20004" tab_order="4">
                                                                        <text>#lbl_description</text>
                                                                     </static> 
                                                                 </cell>
                                                              </stack>
                                                           </cell>
                                                           <cell>
                                                              <stack layout="vert" spacing="5">
                                                                 <cell size="22">
                                                                    <combobox id="NoteType" tab_order="3">
                                                                       <field>Note Type</field>
                                                                        <source type="Contact.Contact_NoteNote 
                                      TypePicklist" field="Value" format=":[:(Label):]"></source>
                                                                    </combobox>
                                                                 </cell>
                                                                 <cell>
                                                                    <control id="0x103f" tab_order="2"></control>
                                                                 </cell>
                                                              </stack>
                                                           </cell>
                                                        </stack>
                                                     </cell>
                                                  </stack>
                                               </cell>
                                            </page>
                                         </form>
                                      </forms>
                                      

                                        Script Element of the forms_xx.xml File

                                        The script element stores all JavaScript functions that Oracle CRM On Demand Desktop uses in the user interface of the current form. You can use these scripts for different purposes, as required. You must describe all script functions in the CDATA section of the validation_rules element.

                                          Example Code of the Script Element

                                          The following code is an example of the script element:

                                          <script>
                                          <![CDATA[ 
                                             include("forms.js", "forms");
                                             var ctx = {
                                             "application": application,
                                             "ui": ui,
                                             "application_script": application_script,
                                             "form": form
                                             };
                                             var current_form = new forms.contact_note(forms.create_form_ctx(ctx));
                                          ]]>
                                          </script>
                                          

                                            Info Bar Element of the forms_xx.xml File

                                            The info_bar element is an alternative to the page element. You can use it to add a layout that the original form layout does not determine. You can use the info_bar element to extend the original form but not to modify the original form. For example, the predefined mail form includes an Info Bar. The Info Bar element contains the Share With On Demand content that Oracle CRM On Demand Desktop displays if the user clicks the Share Bar. The Info Bar does not affect other parts of the form.

                                            Note the following differences between how you can use the info_bar element and the page element:

                                            • To customize only a section of a predefined Microsoft Outlook form, you can use the info_bar tab, for example, on the Mail, Task, or Calendar, forms.

                                            • To customize an entire form, you can use the page element. For example, the page element replaces the native Contact form in Microsoft Outlook with a custom Oracle CRM On Demand Desktop form.

                                              Page Element of the forms_xx.xml File

                                              The page element describes the layout of the form. The layout is defined by a set of cell tags that contain the user interface elements and data that make up the form. Note the following requirements for the cell element:

                                              • A cell element can be empty or can contain a stack of cell elements in the stack element or a control.

                                              • A cell element can contain a user interface element or a piece of data from a native Microsoft Outlook object and from a standard or custom Oracle CRM On Demand object. If you must place more than one object in a cell, then you must use a stack element in the cell element.

                                              A page element can contain only one cell. The page element can include the following attributes:

                                              • id. Contains the page name and is used nowhere else.

                                              • tag. Contains the control ID of the first control on the page of a standard form. It is a page that Oracle CRM On Demand Desktop uses to apply a customized layout. For example, the first control on a General tab of a Contact form uses id=0x402, Details page - 0?11cf, and so on.

                                              • min_height. Describes the minimum height, in pixels.

                                              • min_width. Describes the minimum width, in pixels.

                                                Example Code of the Page Element

                                                The following code is an example of the page element:

                                                <page id="General" tag="0x0402">
                                                   <cell>
                                                   </cell>
                                                </page>
                                                

                                                  Cell Element of the Page Element of the forms_xx.xml File

                                                  The cell element is a layout cell that contains a stack of cells or a control. It defines the position of the stack. It includes the following attributes:

                                                  • size. Defines the cell size, in pixels. You must define the size if the cell is situated in a stack of cells:

                                                    • In a stack of cells that is arranged horizontally, the size defines the cell width.

                                                    • In a stack of cells that is arranged vertically, the size defines the height.

                                                  • attraction. Defines cell docking. You must define the attraction if the cell is in a stack of cells. The following values are available:

                                                    • near. The cell docks to the left side of a horizontal stack of objects or to the top of a vertical stack of objects.

                                                    • far. The cell docks to the right side of a horizontal stack of objects or to the bottom of a vertical stack of objects.

                                                    • both. The cell consumes the entire free space. If more than one cell is set to both, then Oracle CRM On Demand Desktop divides the free space equally between all cells that are set to both.

                                                  The default value is near if the cell size is defined. The default value is both if there is no size.

                                                    Stack Element of the forms_xx.xml File

                                                    The stack element defines a stack of cells that is placed in a cell. Oracle CRM On Demand Desktop docks a cell that contains the near attribute in the following ways:

                                                    • To the top border in a vertical stack

                                                    • To the left border in a horizontal stack

                                                    The stack element includes the following attributes:

                                                    • layout. Defines the type of stack. The possible values include horz (horizontal) or vert (vertical).

                                                    • spacing. Defines the space between cells in a stack. The default value is 0.

                                                    • padding. Defines the space between the cell and the stack border. The cell defines the stack border. This cell contains the stack. The default value is 0.

                                                      Example Code of the Stack Element

                                                      The following code is an example of the stack element:

                                                      <page id="General" tag="0x0402">
                                                         <cell>
                                                            <stack layout="horz">
                                                               <cell size="25"/>   <!--attraction="near"-->
                                                               <cell size="30"/>
                                                               <cell/>         <!--attraction="both"-->
                                                               <cell attraction="both">
                                                               <cell size="20" attraction="far">
                                                            </stack>
                                                         </cell>
                                                      </page>
                                                      

                                                        Control Tags of the forms_xx.xml File

                                                        The control element defines a control that is located in a cell. It includes the following attributes:

                                                        • id. Defines the control ID. If you use the id attribute to specify the ID of a native Microsoft Outlook control, then Oracle CRM On Demand Desktop requires no more attributes except tab_order, if necessary. The class attribute defines the control type.

                                                        • tab_order. Defines the tab order of the control. Oracle CRM On Demand Desktop displays the control that contains the smallest tab_order value as the first control in the tab order. You can start at 1. If the control contains no tab_order, then Oracle CRM On Demand Desktop does not include the control in the tab order.

                                                        • allow_negative. The multi_currency control is the only control used with this attribute.

                                                        • caption. For list control only.

                                                        • type. The outlook_view control is the only control used with this attribute.

                                                        • view_id. The outlook_view control is the only control used with this attribute.

                                                        The following controls support the control element:

                                                        • button

                                                        • check box

                                                        • gradient_checkbox

                                                          Control Element Tags

                                                          The control element includes the following tags. These tags depend on the name of the parent control element:

                                                          • source. Used for multivalue controls, such as combobox, lookup, and mvg_primary_selector. It defines the objects that Oracle CRM On Demand Desktop displays in this control. It includes the following attributes:

                                                            • type. Defines the type of an object that Oracle CRM On Demand Desktop displays in the current control. Objects of this type must be described in the basic_mapping.xml file.

                                                            • display_format. Defines what object fields Oracle CRM On Demand Desktop displays in a control. Used for the mvg_primary_selector control only.

                                                            • format. The same as the display_format element but it is applied to other controls.

                                                            • field. Defines what object field is chosen as a value in a box. Used for the combobox control only.

                                                            • left_id. Defines a field on a related object where Oracle CRM On Demand Desktop stores the ID of the parent object. This is the ID of the current object on which the left_id control is used. Used for the mvg_primary_selector control only.

                                                            • item_value. Defines a field on a related object where Oracle CRM On Demand Desktop stores the ID of the parent object. This is the ID of the chosen object. Used for the mvg_primary_selector control only.

                                                          • text. Defines the text that Oracle CRM On Demand Desktop uses for the control. You use this element primarily for the label control.

                                                          • field. Contains the field identifier with which this control works:

                                                            • This field element must be described in the od_basic_mapping.xml file.

                                                            • Contains one attribute, value, which Oracle CRM On Demand Desktop uses for edit controls only. This attribute describes the type of the value for the field.

                                                            • The following values are available: string, binary, int, double, or currency.

                                                            • The API name field is an example of a field identifier.

                                                            Example Code of the Control Element

                                                            The following code is an example of the edit control element:

                                                            <cell>
                                                               <edit id="0x10000" max_chars="100" tab_order="7">
                                                                  <field value="string">Name</field>
                                                               </edit>
                                                            </cell>
                                                            

                                                              Names of the Control Element of the forms_xx.xml File

                                                              The following table describes the names of the control element of the forms_12.xml file.

                                                              Table Names of the Control Element

                                                              Value Description

                                                              button

                                                              A button control. If you use this control, then it is not necessary to use a field element.

                                                              checkbox

                                                              A check box control. The field that the field element assigns to this control must include the following configuration:

                                                              • The name of the field

                                                              • The field type must be Boolean

                                                              combobox

                                                              A simple control that allows the user to choose any value from a list. For more information, see Combobox Control of the forms_xx.xml File.

                                                              datetime

                                                              A datetime control that allows the user to choose a date from a calendar. The field element must contain the date or datetime field.

                                                              dropdown

                                                              A control that displays a menu when the user clicks the control. For example, if the user clicks Addresses on the contact form, then Oracle CRM On Demand Desktop displays Personal Addresses or Business Addresses. For more information, see Dropdown Control of the forms_xx.xml File.

                                                              edge

                                                              A panel control that includes a border. If you use this control in a cell where the size is 1, such as with a separator, then it is not necessary to use a field element.

                                                              edit

                                                              A simple edit box control.

                                                              gradient_checkbox

                                                              A control that behaves like a check box control, but uses a different graphical interface. This control is displayed on the Sharing bar.

                                                              autocomplete

                                                              A control that the user can use to choose any object. Oracle CRM On Demand Desktop uses an autocomplete control to establish a relationship between objects, for example, to link an account with a contact.

                                                              multi_currency

                                                              A control that Oracle CRM On Demand Desktop uses to display the values from more than one field, such as price, revenue, and so on. An example usage of the multi_currency control is where Oracle CRM On Demand Desktop must display the amount and currency values in a single field. For more information, see multi_currency Control of the forms_xx.xml File.

                                                              mvg_primary_selector

                                                              A control that Oracle CRM On Demand Desktop uses to display the Primary association in a many-to-many relationship. For more information, see MVG Primary Selector Control of the forms_xx.xml File.

                                                              outlook_view

                                                              A control that Oracle CRM On Demand Desktop uses to display a set of related items in the Microsoft Outlook view or form.

                                                              static

                                                              A static control that you can use as a label on a form. If you use this control, then it is not necessary to use a field element.

                                                              subform

                                                              A group of controls that you can use to display the fields of one object on the form of another object. For example, you can display an Oracle CRM On Demand activity on the native form for a Microsoft Outlook or calendar item. For more information, see Subform Control of the forms_xx.xml File.

                                                                Combobox Control of the forms_xx.xml File

                                                                If you set the name of the control element to combobox, then you must define the following tags in the control element:

                                                                • source. Describes the list values for this control. The source element includes the following attributes:

                                                                  • type. Contains the ID of the list that the od_basic_mapping.xml file describes.

                                                                  • field. Contains the name of the field that Oracle CRM On Demand Desktop displays as a list value.

                                                                  • format. Defines the mask for this field output. Attributes are usually the same for all lists. It has the following format:

                                                                    field="Value"
                                                                    
                                                                    format=":[:(Label):]"
                                                                    

                                                                    Although Label is a variable, you must specify it as an absolute value.

                                                                • field. A field of an object that stores a value that the user chooses in a list.

                                                                Example Code of the Combobox Control

                                                                The following code illustrates the use of the combobox control:

                                                                <combobox id="0x20105">
                                                                   <source type="ContactLeadSourcePicklist" field="Value" format=":[:(Label):]"/>
                                                                   <field>LeadSource</field>
                                                                </combobox>
                                                                

                                                                  Dropdown Control of the forms_xx.xml File

                                                                  The dropdown control of the forms_xx.xml file is a button that includes menu options. If the user clicks this button, then Oracle CRM On Demand Desktop displays the menu. Menu items for this menu are added to scripts.

                                                                  If you set the name of the control element to dropdown, then you must define the following tags in the control element:

                                                                  • control. Contains more tags that you can use to describe the dropdown control.

                                                                  • text. The value in the control element that you can use to define the text of the dropdown control.

                                                                  You can use the caption attribute to define the caption for the dropdown control.

                                                                  Example Code of the Dropdown Control

                                                                  The following code illustrates the use of the dropdown control:

                                                                  <cell size="22">
                                                                     <dropdown id="dd_contacts" caption="#lbl_contacts" tab_order="1" 
                                                                  visible="false"></dropdown>
                                                                  
                                                                  </cell>

                                                                    Autocomplete Control of the forms_xx.xml File

                                                                    If you set the name of the control element to autocomplete, then you must define the following tags in the control element:

                                                                    • source. Describes the list values for this Autocomplete control. The source element includes the following attributes:

                                                                      • type. Contains the ID of an object that Oracle CRM On Demand Desktop uses in this control.

                                                                      • format. Defines the mask for this field output, for example:

                                                                        format=":[:(First Name) :]:[:(Last Name):]"
                                                                        
                                                                    • field. The field of an object that stores the ID of the object that the user chooses in a lookup object.

                                                                    Example Code of the Autocomplete Control

                                                                    The following code illustrates the use of the Autocomplete control:

                                                                    <autocomplete id="AccountId" tab_order="57">
                                                                       <field>AccountId</field>
                                                                       <source type="Account" format=":[:(AccountName):]"></source>
                                                                    </autocomplete>
                                                                    

                                                                      multi_currency Control of the forms_xx.xml File

                                                                      If you set the name of the control element to multi_currency, then you must define the following tags in the control element:

                                                                      • value_field. Contains the amount field name.

                                                                      • currency_field. Contains the currency field name.

                                                                      • exchangedate_field. Contains the exchange date field value. This element is optional.

                                                                      Example Code of the multi_currency Control

                                                                      The following code illustrates the use of the multi_currency control:

                                                                      <multi_currency id="AnnualRevenues" tab_order="28">
                                                                         <currency_field>CurrencyCode</currency_field>
                                                                         <value_field>AnnualRevenues</value_field>
                                                                      </multi_currency>
                                                                      

                                                                        MVG Primary Selector Control of the forms_xx.xml File

                                                                        If you set the class attribute of the control element to mvg_primary_selector, then you must define the following tags in the control element:

                                                                        • source. The behavior is similar to the lookup control. The source element includes the following attributes:

                                                                          • type. Defines the many-to-many association ID that Oracle CRM On Demand Desktop uses for this control.

                                                                          • linking_field. Contains the field name of this association where the ID of the parent object is saved.

                                                                          • flag_field. Contains the field name that Oracle CRM On Demand Desktop uses to set the primary flag.

                                                                          • display_format. This attribute defines how to display linked objects.

                                                                            The objects of the fields are First Name and Last Name, and these objects are linked to the item_value attribute. The values in this attribute take the following format:

                                                                            ":[:(First Name) :]:[:(Last Name):]" 
                                                                            

                                                                          outlook_view Control of the forms_xx.xml File

                                                                          If you set the name of the control element to outlook_view, then you must define the following attributes in the control element:

                                                                          • view_id. Contains the ID of the view that Oracle CRM On Demand Desktop uses for this control. The views.xml file describes the view IDs.

                                                                          • type. Defines the ID of the type of objects to display in this control. The od_basic_mapping.xml file describes these objects.

                                                                          If you set the name of the control element to outlook_view, then you must define the following element in the control element:

                                                                          • dasl. Contains filters that Oracle CRM On Demand Desktop applies to this view. This filter must be in dasl format. For more information about dasl, see the relevant Microsoft documentation. Consider the following example:

                                                                            <outlook_view id="contacts_view" view_id="contacts:form_view" 
                                                                            type="Contact.Account.Association" tab_order="41">
                                                                            
                                                                                             <dasl><![CDATA[("http://schemas.microsoft.com/mapi/string/
                                                                            {00020329-0000-0000-C000-000000000046}/od%20AccountId" = '{{id|s}}') AND "http:/
                                                                            /schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/
                                                                            od%20RightStatus" &lt;&gt; 'deleted' AND "http://schemas.microsoft.com/mapi/
                                                                            string/{00020329-0000-0000-C000-000000000046}/od%20LeftStatus" &lt;&gt; 
                                                                            'unsaved']]></dasl>
                                                                                            </outlook_view>
                                                                            

                                                                            data_view Control of the forms_xx.xml File

                                                                            Data_view control has the following structure:

                                                                            <data_view id="activities_view" tab_order="69">
                                                                               <source type="auto" name="ActionJointContact" />
                                                                               <view id="activities:form_view-mvg" />
                                                                               <restriction>
                                                                                  <group link="and">
                                                                                     <binary field="ContactId" condition="eq">
                                                                                        <value type="variable">id()</value>
                                                                                     </binary>
                                                                                     <binary field="ContactStatus" condition="ne">
                                                                                        <value type="string">unsaved</value>
                                                                                     </binary>
                                                                                     <binary field="ActionAssocStatus" condition="ne">
                                                                                        <value type="string">deleted</value>
                                                                                     </binary>
                                                                                  </group>
                                                                               </restriction>
                                                                            </data_view>
                                                                            

                                                                            If you set the name of the control element to data_view, then you must define the following attributes in the data_view element:

                                                                            • id. Contains the ID of the view that Oracle CRM On Demand Desktop uses for this control. The views.xml file describes the view IDs.

                                                                            • tab_order. Defines the tab order of the control

                                                                            You must define the following attributes in the source element:

                                                                            • type. Specifies the storage of the object for the view. It can be outlook, database or auto.

                                                                            • name. Specifies the name of the datasource or object from On Demand basic mapping.

                                                                            You must define the following attribute in the view element:

                                                                            • id. Indicates the name of the view representation defined in views.xml.

                                                                            The restriction block imposes filtering rules on the data set that is passed to data_view control.

                                                                            The group element link attribute specifies whether the conditions should be applied as a whole or separately.

                                                                            You must define the following attributes in the binary element:

                                                                            • field. Indicates the field you want to filter by.

                                                                            • condition. Indicates the compare operator that you want to use. Possible options are:

                                                                              • lt

                                                                              • gt

                                                                              • eq

                                                                              • ne

                                                                              You specify the type of the field in the value element type attribute.

                                                                              The data_view control might use the datasource name instead of the object name in the name attribute of the <source> element. The datasource is required if the right type object in the association is defined in outlook storage. For example, in the association Opportunity.Contact.Association, the right object is Contact, and it is defined in Outlook storage so the datasource is needed. Datasources are defined in data_source.xml file, in the joint element, with the following format:

                                                                              <data_source name="ActionJointContact" type_id="Action.Contact.Association" 
                                                                              resolve_rate="1"/>
                                                                              

                                                                              where:

                                                                              • name. Indicates the name for the datasource to be used in data_view control.

                                                                              • type_id. Indicates the association name from the basic_mapping.xml file.

                                                                              Subform Control of the forms_xx.xml File

                                                                              The following code illustrates the use of the subform control:

                                                                              <cell size="22">
                                                                                 <subform id="activity_subform">
                                                                                    <cell size="22">
                                                                                       <stack layout="horz" spacing="20" padding="6">
                                                                                          <cell>
                                                                                             <static id="ActivityLabel">
                                                                                                <text>Activity Name:</text>
                                                                                             </static>
                                                                                          </cell>
                                                                                          <cell>
                                                                                             <edit id="ActivityName">
                                                                                                <field>Name</field>
                                                                                             </edit>
                                                                                          </cell>
                                                                                       </stack>
                                                                                    </cell>
                                                                                 </control>
                                                                              </cell>
                                                                              

                                                                                Web_page Control of the forms_xx.xml File

                                                                                If you set the name of the control element to web_page, then you must define the url attribute in the control element. The following code illustrates the use of the web_page control:

                                                                                <control class="web_page" id="linkedin_search">
                                                                                   <url>http://www.linkedin.com/</url>
                                                                                </control>
                                                                                

                                                                                You can define a static or a dynamic URL as the value of the url attribute. If the URL is dynamic, then JavaScript supports it. For example, you can present a dynamic personal page for a business contact on the Contact form. The following is an example of this JavaScript:

                                                                                if (!is_new)
                                                                                   form.linkedin_search.navigate = "http://www.linkedin.com/pub/dir/?last=" + 
                                                                                form.item['Last Name'] + "&first=" + form.item['First Name'];
                                                                                

                                                                                If the url attribute is not set, then Oracle CRM On Demand Desktop loads the about:blank page by default.

                                                                                  XML Code to Customize Toolbars

                                                                                  This topic describes the code of the toolbars.xml file. It includes the following information:

                                                                                  For more information, see Customizing a Toolbar.

                                                                                    Example Code of the toolbars.xml File

                                                                                    This topic gives one example of code that you can use in the toolbars.xml file. You might use this feature differently, depending on your business model. The following code is an example of the toolbars.xml file:

                                                                                    <button id="meeting_with_contact" name="#btn_meeting_with_contact" 
                                                                                    small_image="orcl_meeting_with_contact:16">
                                                                                       <action class="scriptable" id="meeting_with_contact"/>
                                                                                    </button>
                                                                                    

                                                                                      Toolbars Element of the toolbars.xml File

                                                                                      The toolbars element is the root element of the toolbars.xml file. It describes the toolbar that Oracle CRM On Demand Desktop adds to a native Microsoft Outlook form or Microsoft Outlook window. The caption attribute of the toolbars element defines the caption of the toolbar. The toolbars element includes the following tags:

                                                                                      • for. Determines if Oracle CRM On Demand Desktop displays this element in a Microsoft Outlook window or Microsoft Outlook form. This depends if the element displayed is the explorer element or inspector element.

                                                                                      • button. A description of a button on a toolbar. For more information, see Button Element of the Toolbars Element of the toolbars.xml File.

                                                                                        Button Element of the Toolbars Element of the toolbars.xml File

                                                                                        The button element includes the following attributes:

                                                                                        • name. The caption for the button.

                                                                                        • small_image. The resource ID of the icon that Oracle CRM On Demand Desktop uses as the small icon for this button.

                                                                                        • large_image. The resource ID of the icon that Oracle CRM On Demand Desktop uses as a large icon for this button.

                                                                                        • begin_group. Determines if Oracle CRM On Demand Desktop displays the separator of the toolbar button for this button. It is useful if you must group toolbar buttons.

                                                                                        Action Element of the Button Element

                                                                                        The button element includes the action element, which defines the action that Oracle CRM On Demand Desktop calls if the user clicks the button. You can use a predefined action or write a custom action. You must set this action in the class attribute of the action element.

                                                                                        The action element includes the attachment element. To define attachment settings, you must define the following attributes of the attachment element:

                                                                                        • type. The type of the attachment object.

                                                                                        • name_field. The name of the field of the attachment object where Oracle CRM On Demand Desktop stores the name of the file.

                                                                                        • body_field. The name of the field of the attachment object where Oracle CRM On Demand Desktop stores the body of the file.

                                                                                        • linking_field. The name of the field of the attachment object where Oracle CRM On Demand Desktop stores the reference to the parent object.

                                                                                        Example Code of the Action Element of the Scriptable Action

                                                                                        Oracle CRM On Demand Desktop supports the scriptable action class. The action element of the scriptable action includes the id attribute. You can use the id attribute in a script to specify the action to perform. The following example specifies a button with a scriptable action:

                                                                                        <button id="new_account" name="#btn_new_account">
                                                                                           <action class="scriptable" id="new_account"/>
                                                                                        </button>
                                                                                        

                                                                                        In this example, Oracle CRM On Demand Desktop passes the value for the new_account attribute to the script when it handles the click event of the button. The script includes the predefined logic which the new_account attribute starts.

                                                                                          XML Code to Customize Dialog Boxes

                                                                                          This topic describes the code of the dialogs.xml file. It includes the following information:

                                                                                          For more information, see Customizing a Dialog Box.

                                                                                            Dialog Element of the dialogs.xml File

                                                                                            The dialog element describes each dialog box. This element is similar to the form element of the forms_12.xml file, but it does not support the on_saved and on_saving attributes. The dialog element in the dialogs.xml file behaves in the same way as the form element in the forms_xx.xml file, except for the following differences:

                                                                                            • The dialog box description includes the layout element and the appearance element.

                                                                                            • The dialogs.xml file does not contain a validation_rules element.

                                                                                            • You cannot use native Microsoft Outlook controls in the dialogs.xml file.

                                                                                              Layout Element of the dialogs.xml File

                                                                                              The layout element is similar to the page element of the forms_12.xml file, but it includes different attributes. These attributes include:

                                                                                              • sizable. Determines if the user can change the size of the dialog box.

                                                                                              • visible. Sets the visibility for the dialog box during creation. If the visible attribute is set to False, then Oracle CRM On Demand Desktop creates the dialog box in the background. To make it visible, you must use JavaScript code to change the value for this attribute.

                                                                                              • caption. Defines the caption for the dialog box.

                                                                                              • small_icon. Defines the icon that displays next to the caption. The value of this attribute must be the ID of an image resource from Oracle CRM On Demand Desktop.

                                                                                                Appearance Element of the dialogs.xml File

                                                                                                The appearance element defines the position and size of the dialog box. It includes the following attributes:

                                                                                                • height. Defines the height of the dialog box, in pixels.

                                                                                                • width. Defines the width of the dialog box, in pixels.

                                                                                                • position. Defines the position of the dialog box in a screen. The position attribute can contain the following values:

                                                                                                  • parent_center. Displayed on the center of a parent window.

                                                                                                  • desktop_center. Displayed on the center of the desktop.

                                                                                                  • custom. A position that the user chooses.

                                                                                                  • top. The top position of the dialog box. The position attribute must include a custom value.

                                                                                                  • left. The left position of the dialog box. The position attribute must include a custom value.

                                                                                                  XML Code to Customize Views Used for Microsoft Outlook Explorer List

                                                                                                  This topic describes the code of the views.xml file. This file contains the set of str tags that define the configuration of the Microsoft Outlook view. The attribute of this element defines the unique name, or ID, for the view. For more information, see Customizing a View.

                                                                                                  The following code is an example of the views.xml file:

                                                                                                  <res_root>
                                                                                                     <str key="sample_view">
                                                                                                     <![CDATA[<?xml version="1.0"?>
                                                                                                     <view>
                                                                                                        <viewname>Sample view</viewname>
                                                                                                        <linecolor>8421504</linecolor>
                                                                                                        <linestyle>3</linestyle>
                                                                                                        <gridlines>1</gridlines>
                                                                                                        <newitemrow>0</newitemrow>
                                                                                                        <usequickflags>0</usequickflags>
                                                                                                        <collapsestate/>
                                                                                                        <previewstyle>color:Blue</previewstyle>
                                                                                                        <arrangement>
                                                                                                           <autogroup>0</autogroup>
                                                                                                           <collapseclient/>
                                                                                                        </arrangement>
                                                                                                        <column>
                                                                                                           <name>HREF</name>
                                                                                                           <prop>DAV:href</prop>
                                                                                                           <checkbox>1</checkbox>
                                                                                                        </column>
                                                                                                        <column>
                                                                                                           <maxrows>4294901760</maxrows>
                                                                                                           <heading>Organization</heading>
                                                                                                           <prop>urn:schemas:contacts:sn</prop>
                                                                                                           <type>string</type>
                                                                                                           <width>987</width>
                                                                                                           <style>padding-left:3px;;text-align:left</style>
                                                                                                           <editable>1</editable>
                                                                                                           <userheading>Organization</userheading>
                                                                                                        </column>
                                                                                                        <orderby>
                                                                                                           <order>
                                                                                                              <heading>Organization</heading>
                                                                                                              <prop>urn:schemas:contacts:sn</prop>
                                                                                                              <type>string</type>
                                                                                                              <userheading>Organization</userheading>
                                                                                                              <sort>asc</sort>
                                                                                                           </order>
                                                                                                        </orderby>
                                                                                                        <multiline>
                                                                                                           <width>0</width>
                                                                                                        </multiline>
                                                                                                     </view>]]>
                                                                                                     </str>
                                                                                                  </res_root>
                                                                                                  

                                                                                                  XML Code to Customize Views Used for Objects Forms

                                                                                                  The view structure described in XML Code to Customize Views Used for Microsoft Outlook Explorer List is used to represent top-level objects displayed on the left side list of Outlook. Objects shown on UI forms in view controls must use the following structure:

                                                                                                  <view id ="Custom view name to be used forms_XX.xml file">
                                                                                                     <image_list>
                                                                                                        <res_id type="normal">Icon name</res_id>
                                                                                                     </image_list>
                                                                                                     <columns>
                                                                                                        <column width="Specify column width" sort = "Specify sorting order: asc or desc">
                                                                                                           <heading type="string">Reference heading name from the package_res.xml file</heading>
                                                                                                           <field>Object field name</field>
                                                                                                        </column>
                                                                                                     </columns>
                                                                                                  </view>   
                                                                                                  

                                                                                                  By using the above XML structure, you must list all of the columns that you want to display on the view, using the <column>…</column> tags. It is recommended that you do not change the above values for some of the attributes, for example, normal for the attribute type, and set the sorting order for no more than one field.

                                                                                                  Note: If you are customizing the view either for association, or if you want some of the fields from the parent object to be displayed on the view, then you must use the extended format of the <field> element, as follows.
                                                                                                  <field>
                                                                                                     <poly_join link="Id field that links objects">
                                                                                                        <if_type name="Object name of the field below">
                                                                                                           <simple>Field name</simple>
                                                                                                        </if_type>
                                                                                                     </poly_join>
                                                                                                  </field>
                                                                                                  

                                                                                                  Views for associations all contain extended structure for the <field> element. For example, this is the view representation for the Contact object, which is a part of many associations, such as Account.Contact.Association, Activity.Contact.Association, and so on. The views for associations are displayed on many objects UI forms, as follows:

                                                                                                  <view id = "contacts:form_view">
                                                                                                     <image_list>
                                                                                                        <res_id type = "normal">type_image:Contact:16</res_id>
                                                                                                     </image_list>
                                                                                                     <columns>
                                                                                                        <column width = "126">
                                                                                                           <heading type = "string">head_first_name</heading>
                                                                                                           <field>
                                                                                                              <poly_join link="ContactId">
                                                                                                                 <if_type name="Contact">
                                                                                                                    <simple>ContactFirstName</simple>
                                                                                                                 </if_type>
                                                                                                              </poly_join>
                                                                                                           </field>
                                                                                                        </column>
                                                                                                        <column sort = "asc" width = "135">
                                                                                                           <heading type = "string">head_last_name</heading>
                                                                                                           <field>
                                                                                                              <poly_join link="ContactId">
                                                                                                                 <if_type name="Contact">
                                                                                                                    <simple>ContactLastName</simple>
                                                                                                                 </if_type>
                                                                                                              </poly_join>
                                                                                                           </field>
                                                                                                        </column>
                                                                                                        <column width = "132">
                                                                                                           <heading type = "string">head_email</heading>
                                                                                                           <field>
                                                                                                              <poly_join link="ContactId">
                                                                                                                 <if_type name="Contact">
                                                                                                                    <simple>ContactEmail</simple>
                                                                                                                 </if_type>
                                                                                                              </poly_join>
                                                                                                           </field>
                                                                                                        </column>
                                                                                                        ...
                                                                                                     </columns>
                                                                                                  </view>
                                                                                                  

                                                                                                  It is recommended that you indicate where the view is to be used by using the following template:

                                                                                                  <view id="<name of the view>:form_view|form_view-mvg|mvg|salesbook"></view>
                                                                                                  

                                                                                                  For example, in the following line indicates a form-view is to be used for the opportunity_competitors view:

                                                                                                  <view id="opportunity_competitors:form_view"></view>
                                                                                                  
                                                                                                  Note: When you register a custom view, you must specify the "custom_view_ctrl": true option, as shown in the following example.
                                                                                                  register_view_control_with_button(ctx, "Opportunity.Competitor", 
                                                                                                  "opportunity_competitor_view", "btn_add_opportunity_competitor", 
                                                                                                  {"custom_view_ctrl": true});
                                                                                                  

                                                                                                  XML Code to Customize the Sales Book Control

                                                                                                  This topic describes the code of the lookup_view_defs.xml file. It includes the following information:

                                                                                                  For more information on configuring options for the SalesBook control in Microsoft Outlook, see Customizing the SalesBook Control.

                                                                                                    Example Code of the lookup_view_defs.xml File

                                                                                                    This topic gives one example of code that you can use in the lookup_view_defs.xml file. You might use this feature differently, depending on your business model. The following code is an example of the lookup_view_defs.xml file:

                                                                                                    <res_root>
                                                                                                       <array key="all_lookup_types">
                                                                                                          <item value="Account"></item>
                                                                                                          <item value="Contact"></item>
                                                                                                          <item value="Opportunity"></item>
                                                                                                       </array>
                                                                                                       <lookup_view_def key="lookup:contacts">
                                                                                                          <display name="Contacts"></display>
                                                                                                          <filter dasl="[http://schemas.microsoft.com/mapi/proptag/0x001A001E] &gt;= 
                                                                                                    'IPM.Contact.OnDemand.Contact' AND [http://schemas.microsoft.com/mapi/proptag/
                                                                                                    0x001A001E] &lt;= 'IPM.Contact.OnDemand.Contact'"></filter>
                                                                                                          <view id="contacts:salesbook"></view>
                                                                                                          <quick_lookup dasl_format="[http://schemas.microsoft.com/mapi/id/{00062004-
                                                                                                    0000-0000-C000-000000000046}/8005001E] = '%s'"></quick_lookup>
                                                                                                          <type id="Contact"></type>
                                                                                                       </lookup_view_def>
                                                                                                    </res_root>
                                                                                                    

                                                                                                    To use the recommended custom SalesBook control, which is the default, you do not require the lookup view definitions listed in lookup_view_defs.xml. Instead, add selectors_options to business_logic.js in the following format:

                                                                                                    scheme.objects.get_object("Account").selectors_options = {
                                                                                                       "source": {
                                                                                                          "caption": "",
                                                                                                          "allow_new": false,
                                                                                                          "view_id": "",
                                                                                                          "search_by": [""],
                                                                                                          "data_source_type": "",
                                                                                                          "online": {
                                                                                                             "view_id": "contacts:online_salesbook",
                                                                                                             "like_template": "*{keyword}*"
                                                                                                          }
                                                                                                       }
                                                                                                    }
                                                                                                    

                                                                                                    where:

                                                                                                    • get_object. Indicates the name of the object for which you are adding selector options.

                                                                                                    • caption. The caption of the object that is displayed on the SalesBook dialog box. You must specify the caption as a reference name from package_res.xml.

                                                                                                    • allow_new. Enables or disables the Add button on the SalesBook dialog box. Possible values are True or False. If this parameter is not specified, then it is set to true by default.

                                                                                                    • view_id. The identifier of the view defined in the views.xml file, which is displayed on the SalesBook dialog box.

                                                                                                    • search_by. The name of the fields to search for in the SalesBook dialog box. You can enter several field names by separating them with a comma as in this example:

                                                                                                      "search_by": ["First Name", "Last Name"]
                                                                                                      
                                                                                                    • data_source_type. Specifies where the object is stored. If the object is defined in the database section of the mapping XML file, then set data_source_type to database. If it is located in the types section, then set data_source_type to outlook.

                                                                                                    • "online": {"view_id". The identifier of the view defined in the views.xml file that is displayed on the online SalesBook dialog box. If you use the same view for the Salesbook dialog box and the online SalesBook dialog box, then you must not specify this parameter.

                                                                                                    If you create a direct or multi-value group (MVG) link using either of the add_mvg_link or add_direct_link functions, then pass null values instead of the view_id or left_objs_view_id or right_objs_view_id parameters.

                                                                                                      Array Element of the lookup_view_defs.xml File

                                                                                                      The array element defines a set of types that is available for the SalesBook control. The user cannot use the SalesBook control to choose a certain object type until you describe this type in the array element. Also, you must specify the type ID as a value attribute of the item element.

                                                                                                      The following code is an example of the array element:

                                                                                                      <array key="all_lookup_types">
                                                                                                         <item value="Account"></item>
                                                                                                         <item value="Contact"></item>
                                                                                                         <item value="Opportunity"></item>
                                                                                                      </array>
                                                                                                      

                                                                                                        Lookup View Definition Element of the lookup_view_defs.xml File

                                                                                                        The lookup_view_def element describes the configuration for the SalesBook control. You can define as many configurations as you require. The key attribute defines the unique ID, or name, for this configuration.

                                                                                                        The lookup_view_def element includes the following tags:

                                                                                                        • display. The name attribute of the display element defines the name of this configuration. Oracle CRM On Demand Desktop displays it as a list value in the top-right corner of the SalesBook control.

                                                                                                        • filter. The dasl attribute of the filter element describes the dasl filter that Oracle CRM On Demand Desktop applies to all objects that the array element describes. The user can view only the objects that match this filter in the SalesBook control.

                                                                                                        • view. The id attribute of the view element defines the view that Oracle CRM On Demand Desktop applies to the list in the SalesBook control. You must describe this view ID in the views.xml file.

                                                                                                        • quick_lookup. The dasl_format attribute of the quick_lookup element defines the dasl filter that Oracle CRM On Demand Desktop applies to the quick search feature of the SalesBook control. To simplify finding a field, this feature allows the user to enter any text to filter records. The user enters text in the top-left edit box on a SalesBook form.

                                                                                                          The following example code allows the user to view records where the File As field is the same as the string:

                                                                                                          <quick_lookup dasl_format="[http://schemas.microsoft.com/mapi/id/{00062004-
                                                                                                          0000-0000-C000-000000000046}/8005001E] = '%s'"></quick_lookup>
                                                                                                          

                                                                                                          where:

                                                                                                          • The File As field is ([http://schemas.microsoft.com/mapi/id/{00062004-0000-0000-C000-000000000046}/8005001E]).

                                                                                                          • The quick search is entered as ('%s').

                                                                                                        • type. The ID attribute of the type element defines the type of object that Oracle CRM On Demand Desktop creates if the user clicks New in a SalesBook control. If you do not define this attribute, then the user cannot create a new object.

                                                                                                          SiebelMetaInfo Element of the od_meta_info.xml File

                                                                                                          The SiebelMetaInfo element is a root element. It does not contain attributes.

                                                                                                            Common_settings Element of the od_meta_info.xml File

                                                                                                            The common_settings element does not contain tags. However, it can contain subtags that you can use to specify common options for the Web Service connector. Oracle CRM On Demand Desktop supports the following subtags:

                                                                                                            • max_commands_per_batch. Defines the maximum number of commands that Oracle CRM On Demand Desktop can place in a single batch. If Oracle CRM On Demand Desktop cannot interpret the value of this element as a positive integer value, then it does not apply any restrictions on the number of commands.

                                                                                                            • max_ids_per_command. Defines the maximum number of object IDs that Oracle CRM On Demand Desktop can specify in a search specification for each independent request when a user performs a query by ID. It is the maximum number of record IDs that can be related to the parent record. For example:

                                                                                                              <common_settings>
                                                                                                                 <max_commands_per_batch>50</max_commands_per_batch>
                                                                                                                 <max_ids_per_command>50</max_ids_per_command>
                                                                                                              </common_settings>
                                                                                                              

                                                                                                              Object Element of the od_meta_info.xml File

                                                                                                              You can use the object element to define an object type that Oracle CRM On Demand Desktop supports. The following table describes the tags that Oracle CRM On Demand Desktop supports.

                                                                                                              Table Tags of the Object Element of the od_meta_info.xml File

                                                                                                              Element Type Description

                                                                                                              EnableGetIDsBatching

                                                                                                              Binary: yes or no

                                                                                                              Allows or disallows you to obtain a batch of record Ids by using a single get command. The following values are valid:

                                                                                                              • False. Disallows you to obtain a batch of record Ids by using a single get command.

                                                                                                              • True. Allows you to obtain a batch of record Ids by using a single get command.

                                                                                                              IntObjName

                                                                                                              String

                                                                                                              The name of the integration object that Oracle CRM On Demand Desktop uses for requests.

                                                                                                              IsAssociation

                                                                                                              Binary: yes or no

                                                                                                              Indicates if this type of object is an association object.

                                                                                                              IsCascadeDelete

                                                                                                              Binary: yes or no

                                                                                                              Not currently used.

                                                                                                              IsTopLevel

                                                                                                              Binary: yes or no

                                                                                                              Indicates if a request for this type of object must be wrapped in a request for an object of some parent type.

                                                                                                              Label

                                                                                                              String

                                                                                                              The label that Oracle CRM On Demand Desktop uses for this type of object in the user interface.

                                                                                                              LabelPlural

                                                                                                              String

                                                                                                              The plural label that Oracle CRM On Demand Desktop uses for this type of object in the user interface.

                                                                                                              SiebMsgXmlCollectionElemName

                                                                                                              String

                                                                                                              The name of the collection XML element that Oracle CRM On Demand Desktop uses in an Oracle CRM On Demand message.

                                                                                                              SiebMsgXmlElemName

                                                                                                              String

                                                                                                              The name of the XML element that Oracle CRM On Demand Desktop uses in an Oracle CRM On Demand message.

                                                                                                              SyncFrequency

                                                                                                              Numeric

                                                                                                              Identifies how often, Oracle CRM On Demand Desktop synchronizes the type, measured in seconds. For example, a setting of 30, sets the synchronization to take place every 30 seconds.

                                                                                                              If you set SyncFrequency to 0, then Oracle CRM On Demand Desktop synchronizes the type during every synchronization session. If you enter a positive integer, then Oracle CRM On Demand Desktop queries the Oracle CRM On Demand server for the records of this type in the time interval you define, starting from the time when the type was last queried.

                                                                                                              TypeId

                                                                                                              String

                                                                                                              Unique ID of this type of object.

                                                                                                              UpsertBusObjCacheSize

                                                                                                              Numeric

                                                                                                              Request attribute that defines the preferred cache size for each upsert operation for each object type. Oracle CRM On Demand uses this information. The following values are valid:

                                                                                                              • 5. Default value for all types.

                                                                                                              • 0. Special value that you can use to resolve a problem that might exist with primaries.

                                                                                                              ViewMode

                                                                                                              String

                                                                                                              Default ViewMode for this type of object.

                                                                                                                Field Element of the od_meta_info.xml File

                                                                                                                You can use the field element to define an object field. You must nest the field element in the definition of an object type. The following table describes the tags that Oracle CRM On Demand Desktop supports.

                                                                                                                Table Tags of the Field Element of the od_meta_info.xml File

                                                                                                                Element Type Description

                                                                                                                DataType

                                                                                                                String

                                                                                                                Indicates the data type. The Web Service connector uses the value for this attribute to perform data conversion.

                                                                                                                HasPicklist

                                                                                                                Binary: yes or no

                                                                                                                Indicates if this field is a bounded list.

                                                                                                                IOElemName

                                                                                                                String

                                                                                                                Name of the XML element that Oracle CRM On Demand Desktop uses in Oracle CRM On Demand messages for values from this field.

                                                                                                                IsCompositeId

                                                                                                                Binary: yes or no

                                                                                                                Not currently used.

                                                                                                                IsFake

                                                                                                                Binary: yes or no

                                                                                                                If the value for this element is Yes, then Oracle CRM On Demand Desktop does not use the value from this field in any requests to the API.

                                                                                                                IsFilterable

                                                                                                                Binary: yes or no

                                                                                                                Indicates if this field is available to choose a filter expression on the control panel.

                                                                                                                IsMVGField

                                                                                                                Binary: yes or no

                                                                                                                Not currently used.

                                                                                                                IsNullable

                                                                                                                Binary: yes or no

                                                                                                                The synchronization engine uses this element to break a circular reference.

                                                                                                                IsPartOfUserKey

                                                                                                                Binary: yes or no

                                                                                                                Indicates if this field is part of a user key.

                                                                                                                IsPrimaryKey

                                                                                                                Binary: yes or no

                                                                                                                Indicates if Oracle CRM On Demand Desktop uses the value from this field as the primary key for the object. Only one field on an object type can be marked as the primary key.

                                                                                                                IsReadonly

                                                                                                                Binary: yes or no

                                                                                                                Not currently used.

                                                                                                                IsRefObjId

                                                                                                                Binary: yes or no

                                                                                                                Indicates if Oracle CRM On Demand Desktop uses this element as a foreign key field. The Web Service connector and the synchronization engine use this element.

                                                                                                                IsRequired

                                                                                                                Binary: yes or no

                                                                                                                Not currently used.

                                                                                                                IsTimestamp

                                                                                                                Binary: yes or no

                                                                                                                Indicates if Oracle CRM On Demand Desktop uses the value from this field as an object timestamp. You can define only one timestamp for each type of object.

                                                                                                                Label

                                                                                                                String

                                                                                                                The label that is displayed in the user interface.

                                                                                                                Name

                                                                                                                String

                                                                                                                Unique name of the field.

                                                                                                                If the IsFake element for this field is set to No, and if this field is not present in requests to the Oracle CRM On Demand server, then this name must be identical to the field name of the Integration Component from the API

                                                                                                                OrderNumber

                                                                                                                Numeric

                                                                                                                Indicates the order number of this field. The Web Service connector uses this element internally. If several fields are defined that hold a reference to the Oracle CRM On Demand parent record, then their order numbers must reflect the nesting order of the parent types. This situation occurs if an association exists between two parent types where one of the parent types is nested in the other parent type.

                                                                                                                PicklistCollectionType

                                                                                                                String

                                                                                                                Type of list items.

                                                                                                                PicklistIsStatic

                                                                                                                Binary: yes or no

                                                                                                                Indicates if the associated list is static or dynamic.

                                                                                                                PicklistTypeId

                                                                                                                String

                                                                                                                The name of the type of the list object. You must use the picklist element to define the list in the od_meta_info.xml file.

                                                                                                                RefObjIsParent

                                                                                                                Binary: yes or no

                                                                                                                Indicates if the object type that is referenced is a parent. The Web Service connector uses this element connector to build the hierarchy for the object type.

                                                                                                                RefObjTypeId

                                                                                                                String

                                                                                                                The name of the object type to which this field refers. This object type must be defined in the od_meta_info.xml file.

                                                                                                                  Extra_command_options Element of the od_meta_info.xml File

                                                                                                                  You can use the extra_command_options element in the definition of an object type to specify extra options that Oracle CRM On Demand Desktop passes to a command element on each request. You can use the option subtag with the following tags to specify each element:

                                                                                                                  • Name. The name of the extra command attribute

                                                                                                                  • Value. The value of the extra command attribute

                                                                                                                    Open_with_url_tmpl Element of the od_meta_info.xml File

                                                                                                                    You can use the open_with_url_tmpl element in the definition of an object type. You use this element to specify a template that Oracle CRM On Demand Desktop uses to open records of this object type in Oracle CRM On Demand.

                                                                                                                    The open_with_url_tmpl element includes the following format:

                                                                                                                    <open_with_url_tmpl>
                                                                                                                       <![CDATA[
                                                                                                                       "URL template"
                                                                                                                       ]]>
                                                                                                                    </open_with_url_tmpl>
                                                                                                                    

                                                                                                                    Oracle CRM On Demand Desktop uses macros in the CDATA section for the attributes that Oracle CRM On Demand Desktop uses in the open_with_url_tmpl template. Each attribute includes the following format:

                                                                                                                    :[:(attribute):]
                                                                                                                    

                                                                                                                    A series of attributes in the command uses the following format:

                                                                                                                    :[:(protocol):]://:[:(hostname):]:[:(port):]:[:(own_id):]
                                                                                                                    

                                                                                                                    where:

                                                                                                                    • protocol is automatically replaced with the URL protocol. The value is http or https.

                                                                                                                    • hostname is automatically replaced with the name of the Oracle CRM On Demand server.

                                                                                                                    • port is automatically replaced with the port number of the Oracle CRM On Demand server.

                                                                                                                    • own_id is automatically replaced with the object ID that Oracle CRM On Demand Desktop uses to open Oracle CRM On Demand.

                                                                                                                    For each macro in the command, Oracle CRM On Demand Desktop replaces the macro with the value at run time. The definition of the template must be enclosed in a CDATA construct. For example, you can use the following code for account objects:

                                                                                                                    <open_with_url_tmpl>
                                                                                                                       <![CDATA[
                                                                                                                         :[:(protocol):]://:[:(hostname):]::[:(port):]/OnDemand/user/
                                                                                                                    AccountDetail?AccountDetailForm.Id=:[:(own_id):]
                                                                                                                       ]]>
                                                                                                                    </open_with_url_tmpl>
                                                                                                                    

                                                                                                                      Picklist Element of the od_meta_info.xml File

                                                                                                                      You can use the picklist element to define a static list. The following table describes the tags that Oracle CRM On Demand Desktop supports.

                                                                                                                      Table Tags of the Picklist Element of the od_meta_info.xml File

                                                                                                                      Element Type Description

                                                                                                                      TypeID

                                                                                                                      String

                                                                                                                      Unique name for the list.

                                                                                                                      SrcObjectTypeId

                                                                                                                      String

                                                                                                                      Name of the object type that Oracle CRM On Demand Desktop uses to retrieve items for this list. This type must be defined in the od_meta_info.xml file.

                                                                                                                      CollectionTypeFldName

                                                                                                                      String

                                                                                                                      Name of the field on the original object that contains the type for the list items.

                                                                                                                      ValueFldName

                                                                                                                      String

                                                                                                                      Name of the field on the original object from which Oracle CRM On Demand Desktop retrieves values for the list items.

                                                                                                                      LabelFldName

                                                                                                                      String

                                                                                                                      Name of the field on the original object from which Oracle CRM On Demand Desktop retrieves labels for the list items.

                                                                                                                      LangFldName

                                                                                                                      String

                                                                                                                      Name of the field on the original object that contains the language code.

                                                                                                                        Master_filter_expr Element of the od_meta_info.xml File

                                                                                                                        You can nest the master_filter_expr element in the definition of a list. You can use this element to define a filter expression that Oracle CRM On Demand Desktop applies to any request for items of this list. You must enclose the value for this element with a CDATA section and display the values for the search specification attributes of the target object type.