Hi there
I use chain of command to trigger an action after the posting of the packing slip. There's more to the code, but in essence what I do is this:
[ExtensionOf(classStr(SalesFormLetter_PackingSlip))]
final class Class_SalesFormLetter_PackingSlip_Extension
{
protected void afterOperation(
SysOperationExecutionMode _executionMode,
AifAsyncResult _asyncResult)
{
next afterOperation(_executionMode, _asyncResult);
System.Byte[] byteArray = System.Text.Encoding::UTF8.GetBytes("BOOH!");
System.IO.MemoryStream stream = new System.IO.MemoryStream(byteArray);
File::SendFileToUser(stream, "something.txt");
}
}
I would expect this to trigger the download of the file "something.txt", but instead I get the error
"An internal error has occurred. Please contact your system administrator."
I guess triggering a client action like sending a download during the process isn't allowed, but since it's triggered in the afterOperation I'd expect this to work.
Any thoughts?
*This post is locked for comments
I have the same question (0)