Sorting on the fields predefaulted using RowIdToRowIdNum function
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
But if sorting is done on “SR Number” then below results are shown:
SR Number Created
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.