PreviousRecord Method for a Business Component

The PreviousRecord method moves the record pointer to the previous record in a business component, making that record the current record. This method returns one of the following values:

  • An integer in Siebel VB that includes one of the following values:

    • 1. Indicates the method successfully moved the record pointer to the next record.

    • 0 (zero). Indicates the method did not move the record pointer because it points to the last record.

  • A Boolean value in Siebel eScript and COM.

Format

BusComp.PreviousRecord

No arguments are available.

Usage

You can use the PreviousRecord method only on a business component that Siebel CRM has queried with the CursorMode mode argument set to ForwardBackward. For more information, see ExecuteQuery Method for a Business Component.

Used With

COM Data Control, COM Data Server, Siebel Java Data Bean, Mobile Web Client Automation Server, Server Script

Examples

The following Siebel eScript example locates the next-to-last record in a query and then manipulates it:

with (this)

{
  ActivateField("Name")

  ClearToQuery();

  SetSearchSpec("Name", "A*");

  ExecuteQuery(ForwardBackward);

  isRecord = FirstRecord();

  while (isRecord)

  {
    // do some record manipulation

    isRecord = NextRecord();

    } // end while loop

  nextToLastRecord = PreviousRecord();

  if (nextToLastRecord)    // verify that there is a penultimate record

  {

  // do some more record manipulation that applies only to next-to-last record

  } // end if

} // end with

For more information, see ExecuteQuery Method for a Business Component.