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

CountRecords Method


CountRecords uses database aggregation to count the records in a business component.

Syntax

BusComp.CountRecords();

Argument
Description

Not applicable

 

Returns

Not Applicable

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();
         ActivateField("Name");
         SetSearchSpec ("Name", "A*");
         ExecuteQuery ();
         var count = CountRecords();
      }

      // other code..

      return (CancelOperation);
   }

   return (ContinueOperation);
}

Siebel Object Interfaces Reference