Custom Code Printing AR Invoice Form -> "Invalid AgentID"

Yeah, I do that in all my functions, that’s where the “Invalid AgentID” exception was coming from

In this case no catch there though, which may be a good thing, cuz that tells me I got out of the function without an error and something is happening further downstream

now to find it

You’re better at following my advice than I am.

Got it !!

so the “SystemTaskAgent” (from “SystemAgent”) was the fix,

When I got the correlation error after that and finally got to look at the server trace, big long error about transaction enlistment.

Well, when I was fighting the original error at some point I turned on “requires transaction” for the function, so I turned that off and it works !

Thanks for your help, I’ll mark the “SystemTaskAgent” part of the post as the solution