Hey All,
I am working on a dashboard that will allow a user to change the Resource Group tied to an Operation, but I am getting a null object error along the way.
My first shot was to use the UBAQ functionality to do everything:
After updating the ResourceGrpID field in the JobOpDtl Table, I got the following error:
I also tried to tackle this by code, and am getting the same error:
Erp.Contracts.JobEntrySvcContract jobEntryBO = null;
jobEntryBO = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.JobEntrySvcContract>(Db);
foreach (var row in ttResults)
{
if (row.RowMod == "U")
{
var jobTableset = new JobEntryTableset();
jobTableset = jobEntryBO.GetByID(row.JobOprDtl_JobNumber);
var jobOpDtl = jobTableset.JobOpDtl;
var jobOpDtlRow = (from dtlRow in jobOpDtl where (dtlRow.Company == Session.CompanyID) && (dtlRow.AssemblySeq == row.JobOpDtl_AssemblySeq) && (dtlRow.OprSeq == row.JobOpDtl_OprSeq) select dtlRow).FirstOrDefault();
jobOpDtlRow.RowMod = "U";
jobEntryBO.ChangeJobOpDtlResourceGrpID("Eng",ref jobTableset);
jobEntryBO.Update(ref jobTableset);
}
}
I received the following error:
Any idea of what else needs to be referenced or updated for this to work?
Thank you for the help in advance!
Matt Willett
Systems Analysts
E10