ttJWJobHead has more than one record - BPM on OrderJobWiz.CreateJobs

Hello,

I created a quick BPM to run during the Order Job Wizard that gets details from a template part number for any on-the-fly parts, automatically.

It’s a Post Process Directive on OrderJobWiz.CreateJobs, that invokes the JobEntry.GetDetails method. This BPM works great when there are no other jobs listed in the Job Wizard screen. However, if there are I get the following error.

The table ttJWJobHead has more than one record

I’m assuming there is some way to program around this, but for the life of me, I can’t figure it out.

Below are some screenshots and attached in the BPM export (10.2.200.8).

image.png

OrderJobWiz.bpm (17.6 KB)

Did you ever figure this out? I have a BPM also giving an error when there are jobs. I have to close the wizard then open and hit create jobs and it works on the second open of the wizard. Can’t figure it out either.

Hello @mmcwilliams,

I never did figure this out. This wasn’t my project, I was trying to help someone out, but didn’t spend much more time on it after this.

Wish I could be more helpful.

This ended up working for me adding this before the rest of the custom code.

foreach (var ttJWJobHead_Row in (from row in ttJWJobHead select row))

Hey, I tried your resolution but it seems like you are missing some syntax afterwards { } so

foreach (var ttJWJobHead_Row in ttJWJobHead) { code here}

Can you please share how you implemented this fix above?

There is not specific code that goes in the code block {} What are you trying to accomplish? That will determine what you put in there. This was a while ago and I think we went a different route at the end.

Hello, I have a thread here: ttCustomer has more than one record error - BPM for email alert when new cust is added - #9 by aarong

I am running into an issue where ttCustomer has more than one record. I think an issue where if ttCustomer has more than 1 record it errors out when I try to post ARInvoices. Which route did you take to fix this issue?