Configuring Siebel Business Applications > Configuring Views, Screens, and Applications > Creating and Deploying an Application >

Customizing the Sort Order for Siebel CRM


To customize the Sort Order dialog box for Siebel CRM, you set the Sort Web Page property of the application object to use the template file for the Sort Order dialog box. You can use the Sort Dialog to display one or more instances of a list of fields on which to sort, and the sort order to use. You can use a control that calls the SortOrder method to call the Sort Dialog. You can use this control only in a base template of a list applets. For information about other sort capabilities, see How a Business Component Sorts Records.

You use the swe:sort-field tag to display the list of sortable fields and the sort order options. This sequence attribute is a required attribute of the swe:sort-field tag that specifies the order in which Siebel CRM sorts the chosen columns. For information how to configure tags and web templates, see About Siebel Web Templates.

The following code is an example of the format for the swe:sort-field tag:

<swe:sort-field sequence="1"/>

This tag renders the following HTML select lists:

  • A list that includes the fields that the user can sort. Siebel CRM maps these fields to the swe:control tags in the base template for the applet.
  • A list that includes Ascending and Descending, which determines the sort order.

You can include as many swe:sort-field tags in the sort web page as you require.

To customize the sort order for Siebel CRM

  1. Open Siebel Tools.
  2. In the Object Explorer, click Web Page.
  3. In the Web Pages list, locate the web page that you will use for the sort web page, and then note the web template that this page references.
  4. Add your custom code to the web template that the sort web page references.

    For an example, see Code Fragment from an Example Sort Web Page.

  5. In the Object Explorer, click Application.
  6. In the Applications list, locate the Siebel application you must modify.
  7. Set the Sort Web Page property to the web page you located in Step 3.
  8. To create the link or button that executes the sort, create a web page item that calls the ExecuteSort method. It is not necessary to define the View and Applet parameters for this method because these parameters default to the currently active view and applet.
  9. Compile and test your changes.

    For more information, see Using Siebel Tools.

Code Fragment from an Example Sort Web Page

The following code is a fragment from an example sort web page:

<swe:form>

<table width=100% bgcolor="#EEEEEE" border=0 cellspacing=0 cellpadding=3>

<tr>

<td><swe:pageitem id="1" property="DisplayName"/></td>

<!--"Sort By" Label -->

</tr>

<tr>

<td><swe:sort-field sequence="1"/></td>

<!-- First column to sort on -->

</tr>

<tr>

<td><swe:pageitem id="2" property="DisplayName"/></td>

<!-- "Then By" Label -->

</tr>

<tr>

<td><swe:sort-field sequence="2" /></td>

<!-- Second column to sort on -->

</tr>

<tr>

<td><swe:pageitem id="2" property="DisplayName"/> </td>

<!-- "Then By" Label -->

</tr>

<tr>

<td><swe:sort-field sequence="3"/></td>

<!-- Third column to sort on --></tr>

<tr>

<td><swe:pageitem id="5" property="FormattedHtml"/></td>

<!-- Execute Sort -->

</tr>

</table>

</swe:form>

Configuring Siebel Business Applications Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Legal Notices.