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
Piotr Wycichowski
Is it something when a user tried to use any of AI commands in SERP? /Piotr W....
10:07 8 Nov 2024
Brittany McGrath
Thank you for your post Lilian. I see this post has been submitted twice and the second post is being addressed so I will close this duplicate. Thank you. ...
09:41 5 Nov 2024