Does anyone know how to create a Report Document record with a LM Activity using a Byte Array / Output Steam as the source data for the binary "Document" field?
I'm attempting to refactor a process that creates .zip files without the need to use a Sys Cmd, and I've successfully done that using native java packages, but now I'm attempting to factor that so no file writes to the server are used.
The process previously created a Report Document record with a file path string for the "Document" value, e.g. "file://D:/output.zip". When I try to reference a variable that stores the Output Stream, either natively or converting to a byte array, a string value is written to the output Report Document, regardless of mime type. it seems any variable that is passed to the to the Document field on the Report Document is interpolated as a string, unless it is a string that includes the "file://" prefix in which case the string is evaluated as a file path.
I've also tried converting the byte array to a binary string just for kicks, but no dice there as well.
Any thoughts or ideas would be much appreciated.
Thanks!
Andy