Hi John,
I had an error "Unable to update table SO_Main..." when testing with your plugin. I found the problem to be the bill types having invoices configured as well - so it was trying to email multiple invoices without re-reading them first (so upon save the concurrency control determined the data was stale) , so by simply adding
- Code: Select all
AndAlso salesOrderReport.BillingType = salesOrder.BillType Then
to your checks for which report to print / email and the problem went away.
Modified plugin attached.
Mike