xInfo.copy Method [AX 2012]

Copies lines from the Infolog buffer.

public container copy(int from, int to)

Run On

Called

Parameters

from
Type: int
The first line to copy.
to
Type: int
The last line to copy.

Return Value

Type: container
Container that contains the Infolog lines between from and to.

The following example uses the copy method to copy the content of the Infolog into a log.

boolean validateRecord() 
{ 
    boolean     ok = true; 
 
    ok = intrastat.validateRecord(); 
 
    if (ok) 
        intrastat.log = ''; 
    else 
    { 
        intrastat.log = Info::infoCon2Str( 
            infolog.copy(infoLogCounter+1,infolog.num())); 
        infoLogCounter = infolog.num(); 
        errorFound = true; 
    } 
  
    intrastat.update(); 
    return ok; 
}

Community Additions

ADD
Show: