Defining the Toolbar
This task is a step in Process of Adding Custom Objects.
For this example, it is desirable to 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 complicated, such as sending an email to all contacts that are related to the custom object. In this example, you add the following buttons to the toolbar:
Add Open in Siebel CRM
Add attachment to the toolbar of the form
Add New Activity to the Siebel CRM Desktop toolbar
To implement these changes, you modify the toolbars.xml file. This file typically already includes definitions for the Siebel CRM Desktop toolbar and the form toolbars, so you create only the custom buttons.
To define the toolbar
Encode the icon that represents the new button:
- Create a PNG file that includes the icon that represents the button in the client.
Encode the PNG file for Base64.
Siebel CRM Desktop stores the icon in the resource file in a Base64 encoded string, so you must encode the PNG file. You can use any standard Base64 encoder, such as base64.exe.
Remove the line breaks from the contents of the output file you created in step b.
Add the contents of the output file you created in step b to the package_res.xml file.
Create a new button for the Siebel CRM Desktop toolbar. You add the following code to the toolbars.xml file:
<toolbar caption="Siebel CRM Desktop" for="explorer"> (…………….) <button name="New Activity" small_image="type_image:Activity:16"> <action class="create_item" item_type="Action"/> </button> (…………….) </toolbar>
Create a new button for the form toolbar. You add the following code to the toolbars.xml file. Note that this code uses the term inspector to reference the form:
<toolbar caption="Siebel CRM 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>