# BPM in Job Receipts to Inventory

**URL:** <https://www.epiusers.help/t/bpm-in-job-receipts-to-inventory/39229>\
**Category:** Epicor ERP 9\
**Created:** [July 11, 2017, 9:28pm UTC](https://www.epiusers.help/t/bpm-in-job-receipts-to-inventory/39229 "2017-07-11T21:28:58Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cathy](https://www.epiusers.help/letter_avatar_proxy/v4/letter/c/9de0a6/32.png) [@Cathy](https://www.epiusers.help/u/Cathy)\
**Post date:** [July 11, 2017, 9:28pm UTC](https://www.epiusers.help/t/bpm-in-job-receipts-to-inventory/39229/1 "2017-07-11T21:28:58Z")

</div>

I want to have an informational message show up as soon as the job number is entered in Job Receipts to Inventory - if there is Salvage Material - to receive the Salvage first.

I have looked at the trace data and have tried Pre-Processing on ReceiptsFromMfg.GetNewReceiptsFromMfgJobAsm.and it does not pop up until the receipt has been processed.

I get very confused by the trace data.

Any help would be appreciated.

I am not a sophisticated BPM writer.

---

<div class="post-metadata">

**Author:** ![gpayne](https://www.epiusers.help/user_avatar/www.epiusers.help/gpayne/32/55751_2.png) [@gpayne](https://www.epiusers.help/u/gpayne)\
**Post date:** [July 11, 2017, 10:35pm UTC](https://www.epiusers.help/t/bpm-in-job-receipts-to-inventory/39229/2 "2017-07-11T22:35:51Z")

</div>

I was able to put a message on post-processing ReceiptsFromMfg.EnableSerialMatching which happens after the job is entered and before GetNewReceipts fires.

We don’t deal with salvage, so I don’t know where that is stored, but I would assume you could do some simple abl code to check for salvage existing and put up the message if it did.

If you can tell me where the data is stored I will throw the basic together.

Greg

---

<div class="post-metadata">

**Author:** ![Cathy](https://www.epiusers.help/letter_avatar_proxy/v4/letter/c/9de0a6/32.png) [@Cathy](https://www.epiusers.help/u/Cathy)\
**Post date:** [July 17, 2017, 4:11pm UTC](https://www.epiusers.help/t/bpm-in-job-receipts-to-inventory/39229/3 "2017-07-17T16:11:29Z")

</div>

I tried using ReceiptsFromMfg.EnableSerialMatching but, the ttparttran.JobNum is null - so I can’t find the JobMtl table.

---

<div class="post-metadata">

**Author:** ![gpayne](https://www.epiusers.help/user_avatar/www.epiusers.help/gpayne/32/55751_2.png) [@gpayne](https://www.epiusers.help/u/gpayne)\
**Post date:** [July 17, 2017, 6:40pm UTC](https://www.epiusers.help/t/bpm-in-job-receipts-to-inventory/39229/4 "2017-07-17T18:40:07Z")

</div>

That does seems to be a dead end. I got an idea about using CallContextClient from an old post between Jose and Rob in 2013 which looks like it will work for this. The callcontextclient.AssemblyName is Epicor.Mfg.UI.RcptToInvEntry.

On JobEntry.GetByID pre processing which is what the Receipt to Inventory calls to get the job set the condition below.

![](https://epiusers.help/uploads/default/original/2X/c/c1b1c1e9a7e00587a812909d6f90e57112be9c05.png)

Then in Actions do ABL code something like this.

* * *

/\* check for Salvage \*/

Disable triggers for load of JobMtl.

define variable InfoMsg as character init ‘’.

For Each JobMtl fields ( SalvageQtyPer ) no-lock where JobMtl.Company = cur-comp and JobMtl.JobNum = JobNum.

```
/* If not SalvageQtyPer > 0 then next. */ /* uncomment after testing */

	 If ttCallContextBpmData.Checkbox01 = true then next.

			InfoMsg = "Salvage exists - do that first ".

			{lib/PublishInfoMsg.i &InfoMsg = InfoMsg}.

			ttCallContextBpmData.Checkbox01 = true.

```

End.

* * *

I don’t know what exact fields you would need, but put only the ones you want in the fields () in the for each and once it is running skip and jobmtl records that don’t qualify to make it run faster.  
I set the checkbox01 to true and then skipped if it was true because I got multiple popups when I tested.

Greg

---

<div class="post-metadata">

**Author:** ![Cathy](https://www.epiusers.help/letter_avatar_proxy/v4/letter/c/9de0a6/32.png) [@Cathy](https://www.epiusers.help/u/Cathy)\
**Post date:** [July 17, 2017, 10:36pm UTC](https://www.epiusers.help/t/bpm-in-job-receipts-to-inventory/39229/5 "2017-07-17T22:36:58Z")

</div>

Take you - I will give this a try. In the tracedata - I saw that is the first place I saw the job I was using was JobEntry.GetByID ,

However, I didn’t know how to narrow it down to the Job Receipt to Inventory transaction.

---

<div class="post-metadata">

**Author:** ![Cathy](https://www.epiusers.help/letter_avatar_proxy/v4/letter/c/9de0a6/32.png) [@Cathy](https://www.epiusers.help/u/Cathy)\
**Post date:** [July 17, 2017, 10:37pm UTC](https://www.epiusers.help/t/bpm-in-job-receipts-to-inventory/39229/6 "2017-07-17T22:37:44Z")

</div>

I meant Thank you

---

<div class="post-metadata">

**Author:** ![Cathy](https://www.epiusers.help/letter_avatar_proxy/v4/letter/c/9de0a6/32.png) [@Cathy](https://www.epiusers.help/u/Cathy)\
**Post date:** [July 17, 2017, 10:59pm UTC](https://www.epiusers.help/t/bpm-in-job-receipts-to-inventory/39229/7 "2017-07-17T22:59:55Z")

</div>

Seems I am having trouble typing today.

In the BPM above it has “Disable triggers for load of JobMtl”.

What does this mean?

I am so new to this.

---

<div class="post-metadata">

**Author:** ![gpayne](https://www.epiusers.help/user_avatar/www.epiusers.help/gpayne/32/55751_2.png) [@gpayne](https://www.epiusers.help/u/gpayne)\
**Post date:** [July 18, 2017, 12:48am UTC](https://www.epiusers.help/t/bpm-in-job-receipts-to-inventory/39229/8 "2017-07-18T00:48:47Z")

</div>

It may not apply to this, but a consultant showed me that as a way to speed up code, especially when you are doing updates. It stops any behind the scenes logic from firing in your bpm.

The other thing he told me was to not include conditions in the where clause and instead use the If condition then next to skip records.

---

<div class="post-metadata">

**Author:** ![gpayne](https://www.epiusers.help/user_avatar/www.epiusers.help/gpayne/32/55751_2.png) [@gpayne](https://www.epiusers.help/u/gpayne)\
**Post date:** [July 18, 2017, 12:50am UTC](https://www.epiusers.help/t/bpm-in-job-receipts-to-inventory/39229/9 "2017-07-18T00:50:47Z")

</div>

Your welcome. I had not done this before either, but this would not work any other way.
