CountRecords Method
The CountRecords method returns the number of records that a business component contains according to the search specification and query specification that Siebel Open UI runs on this business component. It uses the following syntax:
BusComp.CountRecords();
It includes no arguments.
Example
The following example uses the CountRecords method:
var currRetValue={err:false}, retObj;
var model= SiebelApp.S_App.GetModel();
var bo = model.GetBusObject("Opportunity ");
var bc = bo.GetBusComp("Opportunity");
if (bc)
{
bc .ClearToQuery();
bc .SetSearchSpec ("Name", "A");
retObj=currRetValue=bc.ExecuteQuery();
if (!retObj.err) {
var count = bc .CountRecords();
currRetValue={err:false,retVal:count};
}
}
return currRetValue;
For more information, see ClearToQuery Method.