共用方式為


doInsert Table Method

Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

The doInsert method generates values for the RecId field and other system fields, and then inserts the contents of the buffer into the database. This operation is used when the insert method on the table is to be bypassed.

Example

   ttsBegin;
     
    myTable.name = 'Flemming Pedersen';
    myTable.value = 100;
     
    myTable.doInsert();
     
    ttsCommit;

A new record is inserted with the name Flemming Pedersen in the name field and the value 100 in the value field.

Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. Get your copy at the MS Press Store.