Hey Guys,
i built a xmlport to export table data to a .csv / .txt. This works.
Now I'm trying to make a codeunit, which creates the file to a specific folder.
This is the code i am using in the codeunit:
varXmlFile.CREATE('C:\Program Files (x86)\Microsoft Dynamics NAV');
varXmlFile.CREATEOUTSTREAM(varOutputStream);
XMLPORT.EXPORT(XMLPORT::StockkeepingFile, varOutputStream);
varXmlFile.CLOSE;
When trying to run the codeunit, i'll get the error message "Either the caller does not have the required permission or the specified path is read-only"
As we have a three-tier technology, I gave permissions to the specified folder on the service tier, restarted the service and tried again, but error message is still the same.
What could be the problem?
0
Answers
Rishi
I think you should give permission to the user with whom you are running the service. You can see this in administration tool. Or if you thing it's safe, in folder security give the read/write (full permission) to Everyone.
Regards
indeed, this was the problem. Thanks!