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?