HAL to save an attached file to client
Paul Timms
10-10-19
I am struggling to write HAL code which simply takes an attach file from a record and saves it onto the client. The issue appears to be related to the size of the attach file, since below a certain size, my code works correctly.

The code to find the attach file runs on the server, and works fine. The only way I have found to save that file to the client is to run AddAttachFileToArea, then use ClientRemoteAsync.ClientProcedure(filename,area), which runs WriteAreaToFile. The issue is that if the area is above a certain size (somewhere between 300kb and 390kb) the procedure does not run at all.

I have tried sending the Attach2Vc to the client procedure and then using AddAttachFileToArea but this creates a zero byte file on the client.

I then tried, from the client procedure, a remote call to another procedure which does AddAttachFileToArea with a variable area feeding back to the client procedure. This has the same problem as originally, i.e. it only works if the area is below a specific size.

Without ClientRemoteAsync the functions WriteAreaToFile, OutAreaToFile, LogAreaToFile and AppendAreaToFile all write the file to the server.

Does anyone have any ideas? Maybe there's a different way to achieve this?
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
Reino Botha
Please check your version of android if it is the same as the server you are connecting too. ...
08:24 21 Nov 2024
Bror-Erik Kotiranta
In NC you hace operations>>ai chats. They are used for these Br, Bror-Erik...
05:12 21 Nov 2024