Vendor CISUK - BPM Update Help

basically, trying to tick ISCISContractor checkbox but getting below error

“There are no records in the table ds.CSFUK_Vendor”

but if i manually tick in the supplier screen, it works. also, the same code works on client customization via adapters. but its not working via bpm.

any suggestions to resolve this?

PS: the problem is we couldnt update suppliers data if no records exist in CSFUK_Vendor table. to create a record, tick and un-tick ISCISContractor in Supplier maintenance under United Kingdom tab.

Epicor support suggested to do a DMT for all the suppliers but we have 24 companies and each will have around 250 suppliers.

Thought a quick fix be to update this checkbox in Vendor.GetByID pre-processing but not working.

foreach(var item in Db.Vendor.Where(i=> i.Company == Session.CompanyID && i.VendorNum == vendorNum))
{
string vid = item.VendorID;
using (Erp.Contracts.VendorSvcContract va = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.VendorSvcContract>(Db))
{
var vData = va.GetByVendID(vid);
if(vData != null)
{
  try
  {
    vData.Vendor[0]["CSFUK_Vendor_IsCISContractor"] =true;
    vData.Vendor[0]["RowMod"] ="U";
    va.Update(ref vData);
  }
  catch(Exception ex)
  {
    Ice.Diagnostics.Log.WriteEntry(ex.Message);
  }
}
}
}