3.1.5.19 proc_GenerateNextId

The proc_GenerateNextId stored procedure returns an identifier to be used for a new list item in a specified list, and to increment the value of the identifier returned by the next call to proc_GenerateNextId for the same List.

 PROCEDURE proc_GenerateNextId (
       @WebId                         uniqueidentifier,
       @ListId                        uniqueidentifier,
       @NumIds                        int = 1
 );

@WebId: The Site Identifier (section 2.2.1.11) of the site containing the List.

@ListId: The List Identifier (section 2.2.1.5) of the List.

@NumIds: proc_GenerateNextId MUST increment the value of the list item identifier returned by the next call by this value. This value MUST be a positive number (greater than zero). If the parameter is not provided, 1 is used.

Return Values: The proc_GenerateNextId stored procedure returns a positive integer return code, which is the available list item Identifier (section 2.2.1.6) for the specified List.

The proc_GenerateNextId stored procedure MUST NOT return a result set.