No, I'm not dead - I just got a new job over at Financialforce.com and they're keeping me busy.

In honor of my new employer I figured I'd post some sample code that creates a Financialforce.com (Accounting) sales invoice record via salesforce DML and then "posts" it via the Financialforce.com APIs (currently the only way to post documents).

If you ever need to write triggers on the c2g__codaTransaction__c or c2g__codaTransactionLineItem__c objects posting a document is your only way to test them!

One last note: using the Financialforce.com API requires an API key - but those are free upon request. File a support case to get one.