FileExists and FileSize
Paul Timms
10-3-19
I have an interesting HAL problem. I have written an export, which uses CreateFile, WriteAreaToFile, and CloseFile. I am then using FileExists and FileSize to check that the file exists and is not empty.

WriteAreaToFile, FileExists and FileSize run by default on the server, whereas CreateFile and CloseFile run on the client. To make the other functions run on the client, I added them to a different procedure, which I'm calling with ClientRemoteAsync.procedure-name.

One of the variables I'm feeding into the client procedure is var boolean res, which is set as true if the file exists and is not empty.

The problem is that the value of res does not get fed back into the main procedure. I have traced res being set to true in the client procedure, but res is still false in the main procedure, immediately after calling the client procedure.


Has anyone got any ideas on how to run functions using ClientRemoteAsync which can feed a value back to the server function?
Leave Comment
You can subscribe to notifications for this post by selecting the 'star' icon on the top right corner of the post.
Latest Posts
David Delač
Hi Piotr, The log entry:
2024-12-14 08:40:43 0.000 CallHal(IsHansaWorldCustomer) appears because the server is running with the verbosity=debug-detailed setting in its parameters.txt file. Thi...
09:43 16 Dec 2024
Brittany McGrath
Hi Vaughn, I can confirm this has been fixed now and is live in Standard ERP 2024-11-20 Version: 85556786. Thank you. ...
10:04 10 Dec 2024