BPM Set Field function not working

We want to add the order number to our jobs (we are make-to-stock) so I’ve added a UD field to JobHead called DemandRef_c and have added it to the Job Status list view. I then created a BPM data form.
The plan is when firming the jobs the data form opens and the user inputs the order number. This get entered into all the jobs being firmed in the grid in Job Status Maintenance. The UD field is working correctly and the BPM data form opens when I click “Firm All” and “Process” in Job Status Maint. however the fields never update.
Here’s my BPM. I’m using a similar workflow as shown in this thread.
BPM Data Form
image
My condition is:
image
My BPM Data Form is:
image
My Set Field action is:
image
My expression:
image
My UD field just never gets updated. Am I missing some code somewhere?
TIA

Update: I’ve tried calling a post-processing method from my pre-processing method instead of setting the field as I show above.

I now show the order number in the fields on the Job Status Maint. grid but they are not populating the fields.

image

I think I’m only adding the BPM data to the temporary field and it disappears as soon as I click off the screen.

My fields are good because I can add data in job entry and it shows in my BAQ.

image

How can I use Set Field to add the data to the JobHead.DemandRef_c field instead of the ds.JobHead.DemandRef_c fields.
Thanks

I submitted a support case for this through EpicCare to see if they had any ideas. I’ll report back anything I find there.

Have you received any feedback from support? I’m also fighting a “Set Field”… that won’t set… in a Post-Processing directive. I think you may be right that it is targeting a ds. table so may not be taking hold in a Post Process directive.

“Set Field” seems to work in Pre-Processing directives… but I agree it makes sense that a POST “Set Field” should target the base table and not the ds table.

Post Processing means you are adding some logic happening after the method was called. So you add code after MasterUpdate was called. And everything is already written into database

1 Like

I haven’t had any response from support yet on this. I reached out again this morning to ask for an update.
I do think @Olga is correct that the post processing affects the data after its been sent to the server. However I’ve not been able to get the Set Field to work in a pre-processing BPM. Nothing happens. The only way I can get anything to show the BPM data form input is using a post processing BPM. I’m hoping others here can look at this and help shed some light on it. I’m trying to get this put in place by the end of next week. I know this thread hasn’t had a lot of attention.
We are currently using the DMT tool to add data to the JobCode field (and our UD field) but thats not a very good workflow.

And this makes sense. If I call update in a post process, then that would trigger the BPM on Update, which would call Update again, …

We put Order/Line/Rel on our JobProd to perform the same thing you’re trying to accomplish. However, since we have the modules, we are looking to do what @jgiese.wci is doing and use Make to Order and use the WIP Location to store the finished goods until shipping time. The jobs will be tied to the order automatically and we can get rid of this somewhat brittle link we’ve created.

1 Like

That would be good and I hope we evolve to that someday. I do wonder, and I’ve asked this of Epicor support, why the set field just doesn’t do anything when I have it in a pre-processing BPM. It seems very simple and straight forward but I can’t tell if I’m building the BPM wrong or if its some bug with the widget.

Many users have Pre-Processing BPMs working, so I wonder what is happening here. This usually boil down to a few reasons, including but not limited to:

  • Hanging the BPM off a method that isn’t getting called but we think it is. Sometimes the trace is for a different situation than we are trying to solve, etc.

  • BPM conditions not setup correctly

  • Updating a status field (Ready For Processing, Job Closed, etc.) that are really processes that run which then update the status field.

I see you’re using numbers… Any chance your UD Field is an INT and your BPMData field is a Char? Perhaps it can’t “set” the field because they’re mismatched types?

You could try changing your BPMdata field to Number01 and see if that works?

1 Like

Thanks for the idea. I looked at all the fields and they are all set for nvarchar. I know I’m using numbers for both our UD field and JobCode field but we can and will add characters in them such as number-number or just the word STOCK.
I also went back in and rebuilt the preprocessing BPM to set the fields and it simply doesn’t have any effect. I had trace on when it ran and it did not change any fields.
I again went in and built the preprocessing BPM to trigger the post processing BPM. This time I added a message to show me the preprocessing was triggering the post processing. I then added the data form on post processing side then set field widgets to un-release and un-engineer the jobs, set fields to add the BPM data form information and widgets to re-engineer and re-release the jobs. Finally a message to tell me it happened. Everything runs and all messages trigger.
As before, changes are made as a temporary table but clear as soon as I click off the job. It just seems like nothing happens on the preprocessing side and anything the happens on the post side is temporary.
Its been almost 2 weeks and I’m no closer to getting this done.

I have to respectfully disagree, that doesn’t make sense.
ALL the bpm methods pre and post target the objects available to them inside the method.
The writes happen after the fact in the backend unless you do something yourself manually.

That happens a lot… :rofl:

Another one

  • The BPM is not designed to update child rows, parent rows, multiple rows etc

What exact BPM is this on?

I am running this on the JobStatus Mass Update BO

Re familiarize me, this is called when you do what in the UI?

Or, just start from scratch and tell us what you want it to do step by step.

OK, We want to add a sales order number to our job travelers. We make everything to stock but production (and Sales) wants to know what order the jobs go to.
To do this I first started manually adding the order number to the JobCode field on JobHead table. That field shows in Job Entry and works great for what we need. But to add the order number for a hundred jobs we want to use Job Status Maintenance. But the JobCode field is read only in that screen and I can’t get it to change with extended properties. Epicor support says it is read only. So I added a UD field so I know it won’t be read only in the Job Status screen.
I want my BPM to run when after I firm a job then click the Process button. My BPM opens a data form window, I enter an order number and it populates the UD field on each job in the job status screen with that number using a Set Field widget.
I can’t get a preprocessing BPM to do that so I tried using a post processing BPM. It adds the order number to the UD field but the number disappears as soon as I click off the row, like it updated a temporary field instead of the permanent field.
I’ve tried several ways to get this to work and even put in an EpicCare case to no avail.

So to spell out what I’m looking to do, I open multiple jobs in Job Status Maint., firm the jobs and click Process. My BPM data form opens and I input an order number. (in my example I’m testing both my UD field and JobCode). Epicor should firm the job and add the data form information to the fields.


It does but the order numbers disappear as soon as I click off the row.

I have tried to do this with both a preprocessing and a post BPM. Neither works.

Ok, now I understand.

I’ll poke at it.

It might just be that BPM does not support saving that way, some of them are limited.
If that’s so, we can work around it, but let’s be sure first.

Certainly understandable. We do the same but we sidestepped the issue.
All of our jobs are make to stock, but if it’s tied to an order, our job is the SalesOrder-Line-Release.
(Our true stock jobs are just next number)

25690-1-1 etc

2 Likes