I had the same problem as you and I duplicated your solution, with the same complication. When the insert code is in a different package than the calling routine it didn't work. Must be a namespace issue. If you resolve it please let me know. In the meantime thank you, thank you to everyone in this thread. I was going nuts with this problem.