Sequence Numbers Component

Fnd_SqNo_Get

Fnd_SqNo_Get (group name) -> Number

Legacy manual page 232

Parameters

ParameterTypeDescription
group nameTextThe sequence number group name
Function resultLongintNext number in the sequence

Description

This function returns the next unique positive long integer based on the group name you pass. This function returns 0 if it is unable to get the next sequence number.

[Invoices]Invoice_Number:=Fnd_SqNo_Get ("Invoice Numbers")
If([Invoices]Invoice_Number=0) ` We were unable to get a sequence number.

ALERT("Unable to get a new invoice number for this record.") CANCEL End if

If the group does not already exist, it is created and 1 is returned as the first number. You can use the Fnd_SqNo_Enable method to pre-define a group and set the starting number.

This method can safely be called from within a trigger or transaction. If you decide you do not need the sequence number, you can return it to the queue using the Fnd_SqNo_Put method.

Extracted source text
            Fnd_SqNo_Get (group name) ➔ Number

              Parameter                     Type                  Description
              group name                    Text                  The sequence number group name
              Function result               Longint               Next number in the sequence

            This function returns the next unique positive long integer based on the group name you pass. This
            function returns 0 if it is unable to get the next sequence number.
              [Invoices]Invoice_Number:=Fnd_SqNo_Get ("Invoice Numbers")
              If([Invoices]Invoice_Number=0) ` We were unable to get a sequence number.
                ALERT("Unable to get a new invoice number for this record.")
                CANCEL
              End if

            If the group does not already exist, it is created and 1 is returned as the first number. You can use the
            Fnd_SqNo_Enable method to pre-define a group and set the starting number.

            This method can safely be called from within a trigger or transaction.
            If you decide you do not need the sequence number, you can return it to the queue using the
            Fnd_SqNo_Put method.