Saving an export directly to the shared folder
Hi All,
For a client i've created a SQL script that generates a datatable that i want to save to a .csv file.
This works as expected via
BRApi.Utilities.SaveFileBytesToUserTempFolder(si, si.UserName, sFileName, fileBytes)
From this location i can present the file to the user from the dashboard button that is generating the export.
However, this file is big and the user settings (of some users) change the number formatting of the export.
Therefore i want to export the file directly to the shared folder (which is easy for the user to access from the front end:
I've tried all options within brapi.FileSystem but cannot find the proper syntax to save this file directly.
The 'issue' is currently solved by storing this file in the user temp folder, then copying it over to the shared folder (via another article on this forum) but that touches the file twice so preferably i want to save the file directly from the fileBytes (that is a Encoding.UTF8.GetBytes(dt) into the shared folder.
Any suggestions would be great.