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