JmgCleanupTermReg.archiveToFile Method [AX 2012]

Archives records from the JmgTermReg table or the JmgTermRegArchive table to a file. The records are fetched from the specified query run, and loaded into the JmgTermRegArchiveMap map.

private void archiveToFile(QueryRun _queryRun)

Run On

Called

Parameters

_queryRun
Type: QueryRun Class
QueryRun referencing either the JmgTermReg records, or JmgTermRegArchive records which should be archived to a file.

For a description of the file format, see JmgCleanupTermReg::termReg2Container Method.

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(); 
    } 
}

Community Additions

ADD
Show: