TextBuffer.fromFile Method [AX 2012]
Replaces the content of a TextBuffer object with the content of the specified file.
The following are possible values for the encoding parameter that are supplied by the FileEncoding system enumeration:
-
ACP
-
UTF8
-
UTF16BE
-
UTF16LE
-
GB18030
-
AUTO
If the file operation is unsuccessful, the TextBuffer object remains unchanged.
If an attacker can control input to the fromFile method, a security risk exists. Therefore, this method runs under Code Access Security. Calls to this method on the server require permission from the ExecutePermission class. Make sure that the user has development privileges by setting the security key to SysDevelopment on the control that calls this method.