Share via


JmgCleanupTermReg.archiveToTable Method [AX 2012]

Archives records from the JmgTermReg table to the JmgTermRegArchive table. The records are fetched from the specified query run.

Syntax

private void archiveToTable(QueryRun _queryRun)

Run On

Called

Parameters

  • _queryRun
    Type: QueryRun Class
    QueryRun referencing the JmgTermReg records, which should be archived to the JmgTermRegArchive table.

Examples

The following example demonstrates the use of this method.

public void run() 
{ 
    QueryRun qr; 
    #AviFiles 
 
    super(); 
    ttsbegin; 
    startLengthyOperation(); 
 
    qr = this.initQueryRun(); 
    this.progressInit("@SYS39821", SysQuery::countTotal(qr), #AviFileMove); 
 
    switch (cleanupMode) 
    { 
        case JmgTermRegCleanupMode::ToTable: 
            this.archiveToTable(qr); 
            break; 
        case JmgTermRegCleanupMode::ToFile: 
            this.archiveToFile(qr); 
            break; 
        case JmgTermRegCleanupMode::Delete: 
            this.delete(qr); 
            break; 
    } 
    endLengthyOperation(); 
    ttscommit; 
 
    if (caller) 
    { 
        caller.dataSource().research(); 
    } 
} 

See Also

Reference

JmgCleanupTermReg Class