Siebel Object Interfaces Reference > Interfaces Reference > Business Component Methods >

CountRecords Method


CountRecords uses database aggregation to count the records returned by the last ExecuteQuery() call.

Syntax

BusComp.CountRecords()

Argument
Description

Not applicable

 

Returns

An integer indicating the number of records returned by the last ExecuteQuery() call.

Used With

Server Script

Examples

The following example is in Siebel eScript:

function Service_PreInvokeMethod (MethodName, Inputs, Outputs)
{
   if (MethodName == "Call_eScript")
   {
      var bo = TheApplication().GetBusObject("Opportunity");
      var bc = bo.GetBusComp("Opportunity");
      with (bc)
      {
         ClearToQuery();
         SetSearchSpec ("Name", "A*");
         ExecuteQuery(ForwardBackward);
         var count = CountRecords();
      }

      // other code..

      bc = null;
      bo = null;

      return (CancelOperation);
   }

   return (ContinueOperation);
}

Siebel Object Interfaces Reference Copyright © 2008, Oracle. All rights reserved.