JmgCleanupTermReg::container2TermReg Method [AX 2012]

Converts a container to a JmgTermRegArchive record.

client server public static JmgTermRegArchiveMap container2TermReg(container _input)

Run On

Called

Parameters

_input
Type: container
A container that contains values that should be converted to a record from JmgTermRegArchive table.

Return Value

Type: JmgTermRegArchiveMap Map
A JmgTermRegArchive record, based on the input container.

This method should be used to import records from an archive file to the JmgTermRegArchive table. The expected file format is returned by the JmgCleanupTermReg::termReg2Container method.

The following example demonstrates the use of this method.

public void run() 
{ 
    JmgTermRegArchive   jmgTermRegArchive; 
    container           input; 
    FormRun             caller; 
 
    super(); 
    startLengthyOperation(); 
 
    ttsbegin; 
 
    // The first line is the header. Throw that away. 
    fileHandle.read(); 
 
    while (fileHandle.status() == IO_Status::Ok) 
    { 
        input = fileHandle.read(); 
 
        if (input) 
        { 
            jmgTermRegArchive.data(JmgCleanupTermReg::container2TermReg(input)); 
            jmgTermRegArchive.insert(); 
        } 
    } 
    ttscommit; 
 
    if (args && args.caller()) 
    { 
        caller = args.caller(); 
        caller.dataSource().research(); 
    } 
 
    endLengthyOperation(); 
}
Show: