Oracle CRM On Demand Desktop Administration Guide > Customizing Oracle CRM On Demand Desktop > Process of Customizing Objects in Oracle CRM On Demand Desktop >

Defining the Toolbar


This task is a step in Process of Customizing Objects in Oracle CRM On Demand Desktop.

For this example, it is recommended that you implement some actions for the custom object on a toolbar. An action can be simple, such as attaching a note to the custom object. An action can be more complex, such as sending an email to all contacts who are related to the custom object. In this example, you add the following buttons to the toolbar:

  • Add Open in Oracle CRM On Demand
  • Add attachment to the toolbar of the form
  • Add New Activity to the Oracle CRM On Demand Desktop toolbar

To implement these changes, you modify the toolbars.xml file. Because this file typically already contains definitions for the Oracle CRM On Demand Desktop and form toolbars, you define only the custom buttons.

To define the toolbar

  1. Encode the icon that represents the new button:
    1. Create a PNG file that includes the icon that will represent the button in the Oracle CRM On Demand Desktop client.
    2. Encode the PNG file for Base64.

      Because Oracle CRM On Demand Desktop stores the icon in the resource file in a Base64 encoded string, you must encode the PNG file. You can use any standard Base64 encoder, such as base64.exe.

    3. Remove the line breaks from the contents of the output file you created in Step b.
    4. Add the contents of the output file you created in Step b to the package_res.xml file.
  2. To define a new button for the Oracle CRM On Demand Desktop toolbar, add the following code to the toolbars.xml file:

    <toolbar caption="Oracle CRM On Demand Desktop" for="explorer">
      (................)
      <button name="New Activity" small_image="type_image:Activity:16">
        <action class="create_item" item_type="Action"/>
      </button>
      (................)
    </toolbar>

  3. To define a new button for the form toolbar, add the following code to the toolbars.xml file. Note that the code uses the term inspector to reference the form:

    <toolbar caption="Oracle CRM On Demand Desktop" for="inspector">
      (................)
      <button name="Attach File" small_image="attach_btn_img">
        <action class="create_attachment" accept_type="Action">
          <attachment type="Attachment" name_field="Name" body_field="Body"        linking_field="ParentId"/>
        </action>
      </button>
      (................)
    </toolbar>

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