Oracle CRM On Demand Desktop Administration Guide > XML Files Reference >

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});

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