Jaa


Sequence Class

Definition

The Sequence class lets you perform transactions outside the main transaction scope, typically for some kind of sequence, or voucher number generation.

public ref class Sequence : Microsoft::Dynamics::Ax::Xpp::XppObjectBase
[Microsoft.Dynamics.Ax.Xpp.KernelClass]
public class Sequence : Microsoft.Dynamics.Ax.Xpp.XppObjectBase
[<Microsoft.Dynamics.Ax.Xpp.KernelClass>]
type Sequence = class
    inherit XppObjectBase
Public Class Sequence
Inherits XppObjectBase
Inheritance
Microsoft.Dynamics.AX.KernelInterop.ProxyBase
Sequence
Attributes

Remarks

There are three kinds of connections: The main user connection, an auxiliary system connection, and user connections. The first is used for the application logic. The second is used for internal sequence number generation (specifically the built-in field RecId). The third is used for the application maintained separate connections. This class provides an interface to the auxiliary system connection for number generation. However, it may be a better solution to use the UserConnection class, as this is the method the application uses or flexibility, and to avoid concurrency problems with the kernel's sequence number generation.

The following example demonstrates the Sequence class.

static void example() 
{ 
    Sequence S = new Sequence("mySequence",1,100,10000); 
    print S.nextval(10);           // 100 in current company (the subkey) 
    print S.nextval(10);           // 110 in current company (the subkey) 
    print S.nextval(1,"MMM");      // 100 in subkey "MMM" 
    print S.nextval(1,"MMM");      // 101 in subkey "MMM" 
}

Constructors

Sequence()
Sequence(IntPtr)
Sequence(String, Int32, Int64, Int64, Boolean, Int64)
Sequence(String, Int32, Int64, Int64, Boolean)
Sequence(String, Int32, Int64, Int64)

Fields

__k_SequenceId
kernelClass (Inherited from XppObjectBase)

Methods

__shouldCallNew(Type)
addXppProxyReference(Type, Object) (Inherited from XppObjectBase)
Call(String, Object[], Type[], Object[]) (Inherited from XppObjectBase)
cancelTimeOut(Int32) (Inherited from XppObjectBase)
createKernelClass(Object[], Type[], Object[]) (Inherited from XppObjectBase)
currval()

Gets the current sequence number from the sequence, without incrementing the counter value.

currval(String, Int32)
currval(String)
equal(XppObjectBase) (Inherited from XppObjectBase)
finalize() (Inherited from XppObjectBase)
GetIntPtr() (Inherited from XppObjectBase)
GetKernelInstanceUniqueId() (Inherited from XppObjectBase)
getTimeOutTimerHandle() (Inherited from XppObjectBase)
getXppProxyReference(Type) (Inherited from XppObjectBase)
handle()
IsManagedValid() (Inherited from XppObjectBase)
kernelhandle()
KernelInstanceDisposed() (Inherited from XppObjectBase)
MakeReflectionCall(String, Object[]) (Inherited from XppObjectBase)
newmethod() (Inherited from XppObjectBase)
newmethod(String, Int32, Int64, Int64, Boolean, Int64)
newmethod(String, Int32, Int64, Int64, Boolean)
newmethod(String, Int32, Int64, Int64)

Initializes a new instance of the Object class.

nextval(Int64, String, Int32)
nextval(Int64, String)
nextval(Int64)

Returns the next sequence number from the sequence and then increments the counter value.

notify() (Inherited from XppObjectBase)
notifyAll() (Inherited from XppObjectBase)
objectOnServer()
Obsolete.
(Inherited from XppObjectBase)
setTimeOut(String, Int32, Boolean)
Obsolete.
(Inherited from XppObjectBase)
setTimeOut(String, Int32)
Obsolete.
(Inherited from XppObjectBase)
usageCount() (Inherited from XppObjectBase)
VerifyKernelClass() (Inherited from XppObjectBase)
wait() (Inherited from XppObjectBase)
Xml() (Inherited from XppObjectBase)
Xml(Int32) (Inherited from XppObjectBase)

Applies to