Use of indexOf() to restrict number of records in List applet
The requirement is to show only top 10 records in a particular List applet.
This requirement can be implemented using the below steps using indexOf() function.
1. You can limit the number of rows to 10 records on the List applet by setting the applet property called as “HTML Number Of Rows“.
Query your applet name in the Siebel Tools and modify the applet property called “HTML Number Of Rows” to 10.
2. Trick to implement the restriction using indexOf() is below:
Go to your applet and write the below line of code in the Server Script :
function WebApplet_PreCanInvokeMethod (MethodName, &CanInvoke)
if (MethodName.indexOf(“GotoNext”) >= 0 )
CanInvoke = “False”;
3. Compile the applet and see the results.