Updatable BAQ (Job Info)

I created a updatable baq that is used on a dashboard that display job, operation and assembly info. This all works fine. I was then asked to add 3 UD fields (comment, Priority and Programmed)
the 3 fields must be updatable and is on the JobOper table.

The problem is that you cannot make any changes to the JobOper table if the job is released and Engineered . So in the BAQ under Updated I added a BPM directive that sets Engineered on the JobOper to false , I can then write the data and it works but i cannot set the engineered field back to true.

Do I need to change the order I do things in ? Any advice

Are you only updating UD fields on Job Oper?

Correct yes - I only update the 3 UD fields on JobOper

@Anton_ALLtra I don’t know your company structure, but if it is not a deal breaker the changing an engineered job is a setting in company config under the production tab.
image

Another option if you are only updating UD fields is to make you own update. Here is the structure I got from Epicor.

/* update JobOper */
Erp.Tables.JobOper JobOper;

Ice.Diagnostics.Log.WriteEntry("Here in JobOper update ");
foreach (var ttResultsRow in ttResults.Where(r => r.Updated()))
{
    JobOper = Db.JobOper.Where(JobOper_Row => JobOper_Row.Company == Session.CompanyID && JobOper_Row.SysRowID == ttResultsRow.JobOper_SysRowID).FirstOrDefault();
    if (JobOper != null)
    {
        Ice.Diagnostics.Log.WriteEntry("in JobOper " + ttResultsRow.JobOper_CheckNum.ToString());
        
        JobOper.UDField = ttResultsRow.JobOper_UDField;
    }
}

1 Like

Thanks Greg - That is exactly what I needed. My Dashboard is now up and running

1 Like