Share via


systemSequence Class

The systemSequence class takes manual control of the system sequence generator of Microsoft Dynamics AX and delivers unique RecIds for all SQL tables.

Syntax

class systemSequence extends Object

Run On

Server

Methods

  Method Description
Gg957903.pubmethod(en-us,AX.60).gif cancelTimeOut Cancels a previous method call to the setTimeOut method. (Inherited from Object.)
Gg957903.pubmethod(en-us,AX.60).gif equal Determines whether the specified object is equal to the current one. (Inherited from Object.)
Gg957903.pubmethod(en-us,AX.60).gif flushValues Flushes the reserved recIds from the System Sequence cache for a given table
Gg957903.pubmethod(en-us,AX.60).gif getTimeOutTimerHandle Returns the timer handle for the object. (Inherited from Object.)
Gg957903.pubmethod(en-us,AX.60).gif handle Retrieves the handle of the class of the object. (Inherited from Object.)
Gg957903.pubmethod(en-us,AX.60).gif new Initializes a new instance of the systemSequence class. (Overrides the new Method.)
Gg957903.pubmethod(en-us,AX.60).gif notify Releases the hold on an object that has called the wait method on this object. (Inherited from Object.)
Gg957903.pubmethod(en-us,AX.60).gif notifyAll Releases a lock on the object that was issued by the wait method on this object. (Inherited from Object.)
Gg957903.pubmethod(en-us,AX.60).gif objectOnServer Determines whether the object is on a server. (Inherited from Object.)
Gg957903.pubmethod(en-us,AX.60).gif owner Returns the instance that owns the object. (Inherited from Object.)
Gg957903.pubmethod(en-us,AX.60).gif removeRecIdSuspension
Gg957903.pubmethod(en-us,AX.60).gif removeTransIdSuspension
Gg957903.pubmethod(en-us,AX.60).gif reserveTransids
Gg957903.pubmethod(en-us,AX.60).gif reserveValues Preallocates a range of recIds that can be allocated to new records when the automatic assignment of recIds has been suspended.
Gg957903.pubmethod(en-us,AX.60).gif setTimeOut Sets up the scheduled execution of a specified method. (Inherited from Object.)
Gg957903.pubmethod(en-us,AX.60).gif suspendRecIds
Gg957903.pubmethod(en-us,AX.60).gif suspendTransIds
Gg957903.pubmethod(en-us,AX.60).gif toString Returns a string that represents the current object. (Inherited from Object.)
Gg957903.pubmethod(en-us,AX.60).gif usageCount Returns the current number of references, that is, the value of the reference counter, that the object has. (Inherited from Object.)
Gg957903.pubmethod(en-us,AX.60).gif wait Pauses a process. (Inherited from Object.)
Gg957903.pubmethod(en-us,AX.60).gif xml Returns an XML string that represents the current object. (Inherited from Object.)

Top

Remarks

When Microsoft Dynamics AX inserts records into SQL tables, a unique RecId is assigned to each record—regardless of the company each record is associated with.

Use extreme caution when you use this class—data integrity could be destroyed. This class is typically used for data import or export routines, or for very large jobs. The record ID is an int64 data type value. The range in which record IDs are allocated is from 5637144576 to 2^63 (9223372036854775808). RecIds can be used up prematurely if large, unused ranges of RecIds are created. Reclaiming unused ranges of RecIds that lie between used ranges of RecIds is a very complicated process.

Examples

The following example reserves the int64max value for the CustTable table.

static public void Main(Args _args) 
{ 
    systemSequence seq; 
 
    seq = new SystemSequence(); 
    if (seq) 
    { 
        // Allocate 20 recordIds for CustTable table. 
        seq.reserveValues(20, tablenum(CustTable)); 
 
        // Suspend automatic recId allocation. 
        Seq.suspendRecIds(tablenum(CustTable)); 
 
        // Manually generate recIds in the range allocated. 
 
        // Remove the recId suspension. 
        Seq.removeRecIdSuspension(); 
      } 
}

Inheritance Hierarchy

Object Class
  systemSequence Class