Compartir a través de


RecordInsertList Class

Definition

The RecordInsertList class provides array insertion capabilities in the kernel.

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

Remarks

This class lets you insert more than one record into the database at a time, which reduces communication between the application and the database. Records are inserted only when the kernel finds the time appropriate, but they are inserted no later than the call to the insertDatabase, add, and insertDatabase methods. The RecordInsertList.add and RecordInsertList.insertDatabase methods return the accumulated number of records that are currently inserted, so that you can keep track of when the records are actually inserted. The array insert operation automatically falls back to classic record-by-record inserts when non-SQL based tables are used (for example, temporary tables) or when the insert method on the table is overridden (unless it is explicitly discarded). The RecordInsertList class resembles the RecordSortedList class, but it has built-in client/server support (it automatically packs data from one tier to another when this is required) and lacks the sort order features that are available in the RecordSortedList class.

The following example uses the RecordInsertList class to copy a bill of materials (BOM) from one BOM to another.

void copyBOM(BOMId _FromBOM, BOMId _ToBOM) 
{ 
    RecordInsertList BOMList; 
    BOM BOM, newBOM; 
    BOMList = new RecordInsertList(tableNum(BOM)); 
    while select BOM 
    where BOM.BOMId == _FromBOM 
    { 
        newBOM.data(BOM); 
        newBOM.BOMId = _ToBOM; 
        BOMList.add(newBOM); 
    } 
    BOMList.insertDatabase(); 
}

Constructors

RecordInsertList()
RecordInsertList(Int32, Boolean, Boolean, Boolean, Boolean, Boolean, Common)
RecordInsertList(Int32, Boolean, Boolean, Boolean, Boolean, Boolean)
RecordInsertList(Int32, Boolean, Boolean, Boolean, Boolean)
RecordInsertList(Int32, Boolean, Boolean, Boolean)
RecordInsertList(Int32, Boolean, Boolean)
RecordInsertList(Int32, Boolean)
RecordInsertList(Int32)
RecordInsertList(IntPtr)

Fields

kernelClass (Inherited from XppObjectBase)

Methods

__shouldCallNew(Type)
add(Common)

Adds a record to a RecordInsertList object for subsequent insertion into the database.

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)
equal(XppObjectBase) (Inherited from XppObjectBase)
finalize() (Inherited from XppObjectBase)
GetIntPtr()
GetKernelInstanceUniqueId() (Inherited from XppObjectBase)
getTimeOutTimerHandle() (Inherited from XppObjectBase)
getXppProxyReference(Type) (Inherited from XppObjectBase)
handle()
insertDatabase()

Inserts all records that have not already been inserted into the current RecordInsertList object.

IsManagedValid()
kernelhandle()
KernelInstanceDisposed() (Inherited from XppObjectBase)
MakeReflectionCall(String, Object[]) (Inherited from XppObjectBase)
newmethod() (Inherited from XppObjectBase)
newmethod(Int32, Boolean, Boolean, Boolean, Boolean, Boolean, Common)
newmethod(Int32, Boolean, Boolean, Boolean, Boolean, Boolean)
newmethod(Int32, Boolean, Boolean, Boolean, Boolean)
newmethod(Int32, Boolean, Boolean, Boolean)
newmethod(Int32, Boolean, Boolean)
newmethod(Int32, Boolean)
newmethod(Int32)

Creates a new object to hold records for insertion into the database.

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