Oracle CRM On Demand Desktop Administration Guide > XML Files Reference > XML Code to Customize Forms >

Types of Controls for the Control Element of the forms_xx.xml File


This topic describes the types of controls you can configure for the control element of the forms_xx.xml file. It includes the following information:

Names of the Control Element of the forms_xx.xml File

Table 24 describes the names of the control element of the forms_11.xml and forms_12.xml files.

Table 24. 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.

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