what is the best path to export file from Ax 2012 that developer could be sure that everyone have privilege to write and read?
0
votes
3 Answers
0
votes
A similar suggestion to Jan's answer... I think I prefer Matej's suggestion if it's just a 'random' file that you are writing
FileIOPermission _permHACK = new FileIOPermission('','r');
str tempPath;
;
_permHACK.assert();
tempPath = (isRunningOnServer() ?
WinAPIServer::getTempPath() :WinAPI::getTempPath());
CodeAccessPermission::revertAssert();
5
votes
Well, what about the folder returned by getTempPath?
It should be writable by everyone (no guaranties) but there is one for every user!
If you want a shared folder, you should ask the domain admin of your server.
1
votes
Use WinAPI::getTempFilename which creates temporay file on the client.
Use returned filename for temporary data.