Can't retrieve value from database using BAQ

I have a strange situation where if I write a BAQ on erp.JobAsmbl, it will not retrieve the weight field even though the weights are populated in the table. I can see the same behavior in job tracker where the weights are not displayed in the grid even though they exist in the database.

I reported this to Epicor who insist its not a bug because assembly weight is defaulted from the part master, and if its a part on the fly and doesn’t have a weight in the part master, then by definition the assembly weight doesn’t exist.

I disagree - even if that is how the grid in job tracker behaves (which is not what is documented - the field help says its bound to that field not that it is a calculated value), I should still be able to get that value from the database in my BAQ but my BAQ returns nothing.

The only workaround I can think of is to copy the weights from the Job Assembly weight field to a custom UD field, and then write my BAQ to retrieve it from there instead. Seems kind of absurd. Any other suggestions?

We would need a little bit more info such as maybe a SQL Screenshot showing us the database side of things or the BAQ Query.

select JobNum, PartNum, [Weight]
from Erp.JobAsmbl



image

Are you still on 10.1.600? Let me see if I get same result.

Yep 10.1.600 for the time being.
Keep in mind, these are parts on the fly not system defined parts.

Thats interesting you shouldn’t see blanks, you should atleast see 0’s.

If I do <> 0

So in either case, both have a “value”

I think I should see the values that are in the table!!!

I’m guessing you get zeros because you have system defined parts?
Since there is no part master record for my POTF its returning null instead of zero.

I get 0 for PoF and Part Master.

select 
	[JobAsmbl].[Company] as [JobAsmbl_Company],
	[JobAsmbl].[JobNum] as [JobAsmbl_JobNum],
	[JobAsmbl].[AssemblySeq] as [JobAsmbl_AssemblySeq],
	[JobAsmbl].[PartNum] as [JobAsmbl_PartNum],
	[JobAsmbl].[Weight] as [JobAsmbl_Weight],
	[Part].[PartNum] as [Part_PartNum]
from Erp.JobAsmbl as JobAsmbl
left outer join Erp.Part as Part on 
	JobAsmbl.Company = Part.Company
	and JobAsmbl.PartNum = Part.PartNum
where (JobAsmbl.Weight = 0)
 and (Part.PartNum is null)

In the zDataField table, it says you need to have a required module to see the weight.

The module is 00000003-886E-4FCC-8702-FC199E84F2BE, but I don’t know what that is…

AMM?

2 Likes
RohsWeeeManagement "00000003-886E-4FCC-8702-FC199E84F2BE"

image

1 Like

Interesting! We don’t have RohsWeeeManagement, thank you for looking that up!

OK… so that is what? Restricted substances or something?

What is RoHS? RoHS means “Restriction of Certain Hazardous Substances

I think protecting the weight field for that reason is… stupid… doesn’t have much to do with Compliance, its a fricking weight field. If anything it should require Shipping :slight_smile:

3 Likes

So what’s interesting is that I reported another similar bug a couple of weeks ago, which turned out to be the same thing - without that module, then when you engineer your job, the weight doesn’t transfer from the part master to the job details.

They said that was a bug fixed in 10.2.600 though.
I don’t know why I am getting a different answer on this one when it seems like really its the same bug in another format.

1 Like

At the end of the day though, it doesn’t matter, I still need a workaround, any suggestions other than copying the data to a UD field?

Chances are you are going to need this field for more than just this once instance.

Options for Long Term Use:

  1. Buy Rohse Module
  2. Create UD Field and simply populate it via Data Directive when JobAsmbl Weight field is changed

One-Off (On-Prem):
You can make the BAQ Updatable, doesn’t mean your Dashboard has to be updatable. Just don’t mark anything as updatable. You can even select Advanced BPM in the Update tab… make a BASE BPM that has no code.

Then throw in a GetList Post BPM in the UBAQ to populate the field using LINQ.

image

For example here is me getting my weight and adding +5 to all of them:

Basically you give your read-only Updatable BAQ - BPM Powers. :slight_smile:

2 Likes

Thanks for the ideas. I’m curious if I will still have this problem after we upgrade since they said my other bug is fixed in 10.2. That made it sound like the module is NOT supposed to be required to use the weight field. What version are you on?

10.2.700.23

So when Epicor said this is fixed in 10.2.600 that must not be true.

This One-Off should work in all cloud versions except the old Multi-Tenant (MT) because Custom Code blocks are available to Single and Dedicated (Public Cloud) tenants.

2 Likes