GetNextNumberWithGapsCommit - PeopleCode Commands Directory

GetNextNumberWithGapsCommit

Usage:
&number=GetNextNumberWithGapsCommit(Record.Field, &MaxNumber, &Step, [&WhereClause [, &Param1...] ]);

Description:
Returns highest value in Field (subject to WhereClause) plus Step or negative if error. Commits immediately via second database connection.

If this has not answered your question - either search on Google or ask a question below:

Google Product Search

Create a simple Launch Page for your PeopleSoft Databases


Comment: Helper
From PeopleBooks - use GetNextNumberWithGapsCommit instead of GetNextNumberWithGaps Many applications use a sequence number as a unique key. The last number used is stored in a common table, and a SQL statement is issued to retrieve the last number used and update the table. This locks the common table until the whole transaction is saved and the unit of work committed. Instead, consider using the GetNextNumberWithGaps PeopleCode function when gaps in the sequence numbering are acceptable. The function retrieves the last number used, increments it by one, and updates the common table. This is done in a separate unit of work, to minimize the time a database lock is held on the common table. GetNextNumberWithGaps issues a commit only when issued from the SavePreChange or Workflow event.


Questions, Queries and Answers

Your Display Name