BPM invokes .NET code

On a new sales order, I want to invoke a .NET method before the SalesOrder.Update method is called, and set some default values (for example, a sales comment) on the OrderHed table. I am using a Pre-Processing Directive on the SalesOrder.Update method.

I went through the process and created a template. The signature on the method is:

Public Overridable Sub OnBeforeUpdate(ByVal ttOrderHed As System.Data.DataTable, ByVal ttOrderHedAttch As System.Data.DataTable, ByVal ttOHOrderMsc As System.Data.DataTable, ByVal ttOrderDtl As System.Data.DataTable, ByVal ttOrderDtlAttch As System.Data.DataTable, ByVal ttOrderMsc As System.Data.DataTable, ByVal ttOrderRel As System.Data.DataTable, ByVal ttOrderRelTax As System.Data.DataTable, ByVal ttOrderHedUPS As System.Data.DataTable, ByVal ttOrderRepComm As System.Data.DataTable, ByVal ttHedTaxSum As System.Data.DataTable, ByVal ttSelectedSerialNumbers As System.Data.DataTable, ByVal ttSerialNumberSearch As System.Data.DataTable, ByVal ttSNFormat As System.Data.DataTable, ByVal ttTaxConnectStatus As System.Data.DataTable)


I am able to call this but when I try to modify any data in it such as this
ttOrderHed.Rows(0)("PONum") = "Modified"
it throws the following error:
Error Column RequestDate contains null

If I fill in the RequestDate, then I get a similar error on a UserDate1:
Error Column UserDate1 contains null

Right before attempting to change the field, I am able to write a trace of the PONumber to the trace log, and it works fine.

Trace.WriteLine(String.Format("Before a call to SalesOrder.OnBeforeUpdate() PO Num Before{0} Has {1} Rows", ttOrderHed.Rows(0)("PONum"), ttOrderHed.Rows.Count))

Does anyone have any experience using BPMs with invoking .NET calls?

I should be able to modify the data in the ttOrderHed in one, correct?

Thanks for any help,
Mike