Thursday, Jan. 18, 2018

Sorting on the fields predefaulted using RowIdToRowIdNum function

Written By:


January 5, 2013


Posted In:

The requirement is to sort the field called SR Number. In the standard version, the “SR Number” field is pre-defaulted to <Expr: ‘RowIdToRowIdNum ([Id])’>, this prevents from sorting using the number order.
Say for example,
We have three existing Service Requests which when sorted by field called “Created” shows the below results:

SR Number                   Created
1-12345                       24/04/2004
1-123456                     17/01/2005
1-98765432                  25/05/2005

But if sorting is done on “SR Number” then below results are shown:
SR Number                    Created
1-123456                      17/01/2005
1-12345                        24/04/2004
1-98765432                   25/05/2005

Follow the below steps to implement the numeric sorting on a field called “SR Number”
1. In Siebel Tools create a new custom Business Service called “CustomSRNumber” with method as “CreateSRNum”.
Business Service as shown below:


Business Service method as shown below:


Create 3 new Business Serice Method arguments for the above method as below


Add the following lines of code in BusinessService – “Service_PreCanInvokeMethod” and “Service_PreInvokeMethod” event



The business logic to implement the sorting on SR Number field is to make use of its field length(32 in our case). Build all the SR Numbers with length as 20 with leading 0’s as new SR’s will now look like 1-00000000098765432,1-00000000000012345,1-00000000000123456

2. In Siebel Tools, query the Service Request BC and modify the PreDefault value of the field called “SR Number” as shown below:


3. Compile the objects modified above.

4. Launch the Siebel Client application and click on New Button on the Servvice Request List Applet. The New SR will be created as


5. If on clicking New record in the Service Request List Applet an error such as SBL-DAT-00610 is encountered as shown below


Just make the following change in your CFG file as shown below


Just add a new parameter called BusinessServiceQueryAccessList in your client CFG file under [Siebel] section. Set this parameter to a value of your custom Business Service name which is “CustomSRNumber” here.

Happy Learning!!

Share This Article

About Author


Hi, I am sharing my experience to alleviate beginners with open UI and HI version of Siebel CRM. I work in Sun Life Financials and can be reached via IT Tool box as well. Thanks.

  • Rahul

    if any one have idea to implement below change, please let me know
    Requirement is to define the sorting on the column,

    Normally in UI we have a columns as STATUS which can have values Green—

    In UI if you click on column header. It will sort with either Green—Red —yellow or yellow—red—green which is ascending or descending order.

    We need a change which need like this
    Green—yellow— Red or Red –Yellow-Green..can this be done?