This is my first attempt at trying to call a BO from code in a BPM. After hunting around, this seems to be the approximate skeleton, but I’m getting the error below simply trying to create the tableset. I have no idea what other assembly or using statement to add, aside from Erp.Contracts.BO.BomSearch, which I have already added.
The type or namespace name ‘BomSearchTableset’ could not be found (are you missing a using directive or an assembly reference?)
// Assemblies:
// Erp.Contracts.BO.BomSearch
//
using (var bomTran = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.BomSearchSvcContract>(Db))
{
string vPartNum = "MYPARTNUM";
string vRevision = "A03";
//var ds = new Erp.Tablesets.BomSearchTableset();
Erp.Tablesets.BomSearchTableset ds = new BomSearchTableset();
//bomTran.GetDatasetForTree(ref ds, vPartNum, vRevision, "", true, DateTime.Today, true);
//ds.GetDatasetForTree(vPartNum, vRevision, "", true, DateTime.Today, true);
/**
if (ds != null)
{
foreach (var row in ds.Tables[0].Rows)
{
// todo
}
}
else
{
//
}
**/
}
