Error trying to update ResourceGroupID with UBAQ


(Mathew Willett) #1

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

Error in Updatable BAQ for ResourceGrpID
(Brandon Anderson) #2

Have you compared your traces from when you call the change in the program vs when you try to do it with the BAQ?

(Dmitry Kashulin) #3

Most likely that is a bug in JobEntry.ChangeJobOpDtlResourceGrpID method implementation.
I would recomment you contact Epicor Support and provide all details.

(Utah Taylor) #4

The last time I got this, I submitted a case and told that the fix was going to be an aesthetic fix. Here is the exact response:

Development marked this issue as cosmetic. It has not been resolved yet, but looks that the message is the only thing they will be changing.

Able to duplicate in CC (10.2.200 - HV-QTenCC2)

Unfriendly message displays when trying to update the Commission Rate field with updatable BAQ when order has deposit

A more friendly message should display ‘Updating commission rate is not allowed on posted invoices.’


(Dmitry Kashulin) #5

Could you please tell me case\problem number and I will try to stimulate Support for real work :slight_smile:

(Utah Taylor) #6

It is okay, we are trying to update commission rates on closed invoices. For some reason the BAQ works for all invoices as long as they don’t have a deposit invoice. It is only when we are trying to update the commission rate for an invoice with a deposit that we get the NullReferenceException. Honestly, I get why they won’t do it because you shouldn’t be able to update a closed invoice. I just can’t understand why it works for some invoices, but not others.

(Dmitry Kashulin) #7

I’ve inspected source code of JobEntry.ChangeJobOpDtlResourceGrpID method and I see silly programmer’s mistake there that causes NullRef exception.
If you provide me with Case\Problem Id I will be able to ask a PM for fix.

(Haso Keric) #8

Nice! @Mathew

(Al) #9

could you please and kindly confirm if this issue been fixed yet