Io.writeExp Method [AX 2012]

Writes the content of a container to the file.

public boolean writeExp(container data)

Run On

Called

Parameters

data
Type: container
The container with data for the record.

Return Value

Type: boolean
true if the operation succeeded; otherwise false.

If this method returns false, check the status method for the cause.

The entries in the container are treated as fields, and the container is treated as a full record. The field separator is defined in the outFieldDelimiter method. The record separator is defined in the outRecordDelimiter method.

static void testMethod(Args _args) 
{ 
    FileIOPermission _perm; 
    container c; 
    CommaIo myfile; 
 
    _perm = new FileIOPermission("myfile.txt","w"); 
    _perm.assert(); 
     
    myfile = new CommaIo("myfile.txt","w"); 
    // Assign the entries in the container according to record layout. 
    c = [1,"MyText",1.324,"Last field"]; 
    // write this record according to file format (record/field delimiters). 
    myfile.writeExp(c); 
}

Community Additions

ADD
Show: