BPM to Update CreateDate in VendCnt Table

It seems that from a case I opened with Epicor about the comparison of the CustCnt table’s and the VendCnt table’s CreateDate fields, that no code exists in Epicor to update the CreateDate field in VendCnt. Contrary, there is code that updates the CreateDate field in CustCnt when a new contact is added.

They suggested I create a BPM to update the field in VendCnt. So, that is exactly what I set out to do. I began by creating a post-processing under Erp.Vendor.GetNewVendCnt. I added custom code to update CreateDate in the temporary table ttVendCnt. The syntax checks out okay as does the validation process; however, it is not updating the field in the database. It seems simple and straightforward, but apparently I am missing something. Here is the code:

foreach (var ttVendCnt in ds.VendCnt)
{
  ttVendCnt.CreateDate = DateTime.Today;
}

I couldn’t get a Method Directive BPM to work. Neither Erp.Vendor.GetNewVendCnt nor Erp.Vendor.GetNewVendCntMain. Tried both pre- and post- procs.

But an In-Tran Data Directive on table VendCnt does work.

Thanks for the tip Calvin, I will give that a try!

That certainly did the trick!
Thanks again for your input Calvin, it is most appreciated!
J.