# Job work flow/barcode scanning how to?

**URL:** <https://www.epiusers.help/t/job-work-flow-barcode-scanning-how-to/73848>\
**Category:** Epicor ERP 10\
**Tags:** barcoding\
**Created:** [December 18, 2020, 4:31pm UTC](https://www.epiusers.help/t/job-work-flow-barcode-scanning-how-to/73848 "2020-12-18T16:31:08Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![DaveS](https://www.epiusers.help/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@DaveS](https://www.epiusers.help/u/DaveS)\
**Post date:** [December 18, 2020, 4:31pm UTC](https://www.epiusers.help/t/job-work-flow-barcode-scanning-how-to/73848/1 "2020-12-18T16:31:09Z")

</div>

Hi,  
I’ve been asked to do some “automation” with barcode scanning that will replace the fact that our planners currently unengineer jobs (which also unreleases it) so that they can change the Job’s Prod Team: drop down as the job progresses. Then they check Engineered and Released again. They also have custom reports that report on the Prod Team ID.  
Management has suggested we replace this with the ability to scan a new barcode on the Job Traveler and set the Prod Team (or a new field that we can track/report on).

You might be saying why are you folks (y’all) even doing that in the first place and that is unusual. Answer: I don’t know, but we want to do what’s best.

So the newbie questions I have are:

1. Is this where we should be using MES?  
AFAIK We don’t use it for anything currently. We are on Epicor 10.2.300.15 and I can see we are licensed for MESDataCollection and it’s Enabled.
2. What needs to be done?
3. How much time would you estimate that one person with some Epicor form customization/SSRS/BAQ/BPM/RDD experience would take to pull this off that has no MES/barcode scanning experience?
4. What would be the best cost effective barcode scanner to get for this? We probably will need about 14 and we don’t do any scanning right now.

Also, We’ll also need additional minimal PCs/thin clients where the scanners are, so I guess we’ll need to consider if we’ll need addition Epicor licenses. I’m wondering if the license will free up 15 min after a scan.

Thanks,  
Dave S.

---

<div class="post-metadata">

**Author:** ![jgiese.wci](https://www.epiusers.help/user_avatar/www.epiusers.help/jgiese.wci/32/51553_2.png) [@jgiese.wci](https://www.epiusers.help/u/jgiese.wci)\
**Post date:** [December 18, 2020, 4:45pm UTC](https://www.epiusers.help/t/job-work-flow-barcode-scanning-how-to/73848/2 "2020-12-18T16:45:31Z")

</div>

Exactly thinking that… so I’m asking why are you changing prod qty. I wouldn’t so you can track how often you aren’t hitting estimate. If you plan for x and only make y that sounds like a problem.

Before we can help more we would really have to understand why the qty is being changed what’s the objective/roadblock there?

Scanners get 2d, the barcodes can get quite large for the type of scanning your indicating. We use symbol but there are lots out there look at reviews and research symbology a bit.

I would personally avoid thin clients we went that route, and we found if you have a cache issue on a machine because everyone is using the same cache clearing it can become a nightmare. We buy refurb Lenovo mini clients as full desktops and they are cheaper than thin clients with win10 pro on them.

---

<div class="post-metadata">

**Author:** ![DaveS](https://www.epiusers.help/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@DaveS](https://www.epiusers.help/u/DaveS)\
**Post date:** [December 18, 2020, 4:59pm UTC](https://www.epiusers.help/t/job-work-flow-barcode-scanning-how-to/73848/3 "2020-12-18T16:59:19Z")

</div>

> [@jgiese.wci](#):
>
> so I’m asking why are you changing prod qty

Hi Joshua, thanks for the quick response! They are changing Prod Team not Prod Qty.

---

<div class="post-metadata">

**Author:** ![jgiese.wci](https://www.epiusers.help/user_avatar/www.epiusers.help/jgiese.wci/32/51553_2.png) [@jgiese.wci](https://www.epiusers.help/u/jgiese.wci)\
**Post date:** [December 18, 2020, 5:36pm UTC](https://www.epiusers.help/t/job-work-flow-barcode-scanning-how-to/73848/4 "2020-12-18T17:36:24Z")

</div>

Ahhhhh I got it I see now what you’re saying. So one hurdle you will have is in company config there is a flag to allow or disallow changes to engineered jobs. Unless you bastardize the database or change that flag no matter what you do you would always have to unengineer and reengineer the job. Of course you can do that in code, but it adds to the complexity.

The things to consider are:

- Where will your scan field be?
- What all information do you need in the barcode to achieve your change (you will learn this from call traces)
- Run call traces so you know what adapter methods are being called as you take the actions by hand.
- Be proficient enough to manually make those calls in code in order with the correct parameters to automate the steps for the end users

---

<div class="post-metadata">

**Author:** ![adaniell](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/278dde/32.png) [@adaniell](https://www.epiusers.help/u/adaniell)\
**Post date:** [December 18, 2020, 5:44pm UTC](https://www.epiusers.help/t/job-work-flow-barcode-scanning-how-to/73848/5 "2020-12-18T17:44:12Z")

</div>

I work with a client who has heavily customized the job/MES process, including many fields related to the job header that need to change after the job is released. In this case, there are many fields so it made sense to dedicate a UD table to store these fields. This allows the fields to be editable regardless of the state of the job.

---

<div class="post-metadata">

**Author:** ![DaveS](https://www.epiusers.help/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@DaveS](https://www.epiusers.help/u/DaveS)\
**Post date:** [December 18, 2020, 6:14pm UTC](https://www.epiusers.help/t/job-work-flow-barcode-scanning-how-to/73848/6 "2020-12-18T18:14:55Z")

</div>

> [@DaveS](#):
>
> How much time would you estimate that one person with some Epicor form customization/SSRS/BAQ/BPM/RDD experience would take to pull this off that has no MES/barcode scanning experience?

Thanks Adam and Joshua. Anyone got a ballpark time estimate based on what I have described so far?

---

<div class="post-metadata">

**Author:** ![jgiese.wci](https://www.epiusers.help/user_avatar/www.epiusers.help/jgiese.wci/32/51553_2.png) [@jgiese.wci](https://www.epiusers.help/u/jgiese.wci)\
**Post date:** [December 18, 2020, 6:16pm UTC](https://www.epiusers.help/t/job-work-flow-barcode-scanning-how-to/73848/7 "2020-12-18T18:16:55Z")

</div>

Not enough scope defined and too many variables. It would depend a great deal on proficiency of the developer.

---

<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:** [December 18, 2020, 11:09pm UTC](https://www.epiusers.help/t/job-work-flow-barcode-scanning-how-to/73848/8 "2020-12-18T23:09:58Z")

</div>

@DaveS I have an UBAQ that we use to do this, but I am wondering are you changing a used operation to a new team rather than having an operation per team? I wrote it with the understanding that they would set the team before starting to clock on, but I know they move stuff midstream all of the time.

---

<div class="post-metadata">

**Author:** ![aclements](https://www.epiusers.help/user_avatar/www.epiusers.help/aclements/32/16011_2.png) [@aclements](https://www.epiusers.help/u/aclements)\
**Post date:** [December 19, 2020, 12:54pm UTC](https://www.epiusers.help/t/job-work-flow-barcode-scanning-how-to/73848/9 "2020-12-19T12:54:51Z")

</div>

I sometimes think the complexity of bar codes is overstated.

They are just a way of replicating key strokes in an image. Indeed a simple way to trouble shoot a bar code is scanning it in Notepad.

Putting bar codes on the job traveller is fairly straight forward and can save a lot of time.

I have previously had the requirement to display the job number and the operation represented as bar codes which allows the users to replicate the ‘Start Activity’ key strokes in MES.

In terms of SSRS, it is a question of working out what string you need to display and then applying the correct font. I use code 39.

---

<div class="post-metadata">

**Author:** ![DaveS](https://www.epiusers.help/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@DaveS](https://www.epiusers.help/u/DaveS)\
**Post date:** [December 28, 2020, 2:26pm UTC](https://www.epiusers.help/t/job-work-flow-barcode-scanning-how-to/73848/10 "2020-12-28T14:26:42Z")

</div>

Just to get my feet wet, I created a UD## Maintenance Form customization (using Program Ice.UI.UD##Entry.dll).  
I only left Key 1 Visible behavior TRUE (this is where I scan the Job Number to).  
Then I created a UD## Update Pre-Processing Method Directive BPM that has the following:  
Set Field 0 - Set the ttUD##.ShortChar01 field of the added row to the callContextClient.CurrentUserId expression  
Set Field 1 - Set the ttUD##.Key2 field of the added row to the DateTime.Now.ToString(“MM-dd-yyyy HH:mm:ss:ff”) expression

So now when I call the form I:  
Scan the Job from the Job Traveler  
Press Tab  
Click Yes Record Not Found. Add New? prompt  
Press Save to write the row to the UD## table

At this point in a report or whatever, I could get the latest UD## table row for a job to report on the CurrentUserId.  
Note: The idea is that the Job Traveler is scanned from a PC that is logged into Epicor where the userid is named the same as Prod Team ID.

Folks here are OK with me using this approach as long as I can now get rid of the clicks/kep presses (tab, Yes to Add New, Save, Close and Restart the Form) which would allow us to have this setup with Scanner/PC with no monitor, keyboard and mouse…this is a requirement.  
Note: After the Save, using New or Clear shows all the keys visible which is not desired (don’t know why this is happening), so that is why I am having to Close and restart the form.

Any suggestions on how I could accomplish the click-less/kepress-less approach from where I’m at with this?

---

<div class="post-metadata">

**Author:** ![adaniell](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/278dde/32.png) [@adaniell](https://www.epiusers.help/u/adaniell)\
**Post date:** [December 28, 2020, 5:11pm UTC](https://www.epiusers.help/t/job-work-flow-barcode-scanning-how-to/73848/12 "2020-12-28T17:11:39Z")

</div>

Many barcode scanners have a configuration setting that will allow you to append a suffix to the barcode payload. In some cases, it can be a tab, and the result is that the field is tabbed out of after scanning. I think some scanners have limited suffixes and, in some cases, we have had to detect the suffix in the customization and invoke a tab key stroke in code. In most cases, the tab setting work as expected.

To bypass the ‘Add New?’ dialog, try launching the form in developer mode, select your customization, create a new record and check off ‘do not show me this again’ checkbox. Then go into customization mode and save the customization. In my testing this made it so that all users no longer get the prompt when the customization is loaded.

You can automate the save by handling the AfterAdapterMethod but I don’t think this will be necessary after the above.

The issue with the keys reappearing. Sounds like you are fighting against the base logic which tries to reset the base controls. In addition to making the fields not visible, make the size and position as small as possible as well. If this doesn’t work, you probably need to handle the EpiViewNotification event or adapter method events to set the visibility back to false.

---

<div class="post-metadata">

**Author:** ![DaveS](https://www.epiusers.help/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@DaveS](https://www.epiusers.help/u/DaveS)\
**Post date:** [December 28, 2020, 6:04pm UTC](https://www.epiusers.help/t/job-work-flow-barcode-scanning-how-to/73848/13 "2020-12-28T18:04:04Z")

</div>

> [@adaniell](#):
>
> To bypass the ‘Add New?’ dialog

Adam, thanks for addressing each of my issues. Your Add New? tip worked. Thank you. However, the Save after was still necessary, so I’ll try your tip for that and the other tips and reply back to this post.

---

<div class="post-metadata">

**Author:** ![DaveS](https://www.epiusers.help/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@DaveS](https://www.epiusers.help/u/DaveS)\
**Post date:** [December 28, 2020, 9:39pm UTC](https://www.epiusers.help/t/job-work-flow-barcode-scanning-how-to/73848/14 "2020-12-28T21:39:15Z")

</div>

> [@adaniell](#):
>
> You can automate the save by handling the AfterAdapterMethod but I don’t think this will be necessary after the above.

Adam, how/where to handle the AfterAdapterMethod? I can only get the AfterAdapterMethod to fire after I click Save. I used the Form Event Wizard.  
Seems like I just need to find the right event to have something like this in…  
oTrans.Update();  
oTrans.NotifyAll();

---

<div class="post-metadata">

**Author:** ![adaniell](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/278dde/32.png) [@adaniell](https://www.epiusers.help/u/adaniell)\
**Post date:** [December 29, 2020, 2:19pm UTC](https://www.epiusers.help/t/job-work-flow-barcode-scanning-how-to/73848/15 "2020-12-29T14:19:15Z")

</div>

Refer to this thread for a better way to hide the other keys in a persistent way

> [@UD form enter value in key1 textbox press tab not returning record](https://www.epiusers.help/t/ud-form-enter-value-in-key1-textbox-press-tab-not-returning-record/73448/7):
>
> Instead of using the Visible property, use the Customization Wizard → Set Extended properties, to set IsHidden = true for Keys 2 through 5. That also automatically hides the labels too.

To automate the saving, there are many hooks you could use, one is the AfterExitEditMode event of the actual text box. Since it’s a native control, you need to get a reference and define the event manually:

`EpiTextBox etb = (EpiTextBox)csm.GetNativeControlReference("46567b2e-6bc0-4967-be35-a0ec6843838f");`  
`etb.AfterExitEditMode += (s, a) => {oTrans.Update();};`

Verify the GUID above matches your Key1 textbox EpiGUID property, this is visible in the properties, in customization mode.

---

<div class="post-metadata">

**Author:** ![DaveS](https://www.epiusers.help/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@DaveS](https://www.epiusers.help/u/DaveS)\
**Post date:** [December 29, 2020, 4:15pm UTC](https://www.epiusers.help/t/job-work-flow-barcode-scanning-how-to/73848/16 "2020-12-29T16:15:10Z")

</div>

> [@adaniell](#):
>
> Refer to this thread for a better way to hide the other keys in a persistent way

Adam, thanks for that thread link…Also, I did get past that issue by resizing width and height of those text fields to their smallest.

What I’m not understanding is where do you define the event manually with that code to automate the saving? I can’t see where you do that.

---

<div class="post-metadata">

**Author:** ![ckrusen](https://www.epiusers.help/user_avatar/www.epiusers.help/ckrusen/32/50584_2.png) [@ckrusen](https://www.epiusers.help/u/ckrusen)\
**Post date:** [December 29, 2020, 4:23pm UTC](https://www.epiusers.help/t/job-work-flow-barcode-scanning-how-to/73848/17 "2020-12-29T16:23:49Z")

</div>

see this post for adding an event handler to a native control.

> [@Adding an event handler to a native control](https://www.epiusers.help/t/adding-an-event-handler-to-a-native-control/63783/4):
>
> You can make event handlers for native controls. Just make sure to do everything the Wizard does. edit Here’s the steps. Declare an object of the type of the native control. Put this right below // Add Custom Module Level Variables Here \*\* public EpiTextBox txtPONum; //e5d73cb9-1d94-45ce-85be-db4c85fe3264 Create initialze call in public void InitializeCustomCode(). Reference the native controls GUID. txtPONum = (EpiTextBox)csm.GetNativeControlReference("e5d73cb9-1d94-45ce-85be-db4c85f…

The example in that post is for adding a Click event handler. Change all the references of `Click` to `AfterExitEditMode`

---

<div class="post-metadata">

**Author:** ![adaniell](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/278dde/32.png) [@adaniell](https://www.epiusers.help/u/adaniell)\
**Post date:** [December 29, 2020, 4:42pm UTC](https://www.epiusers.help/t/job-work-flow-barcode-scanning-how-to/73848/18 "2020-12-29T16:42:04Z")

</div>

Actually, don’t use a lamba expression as you will not have a reference to unsubscribe, which is good practice. Also declare a global reference to the text box to unsubscribe. This is equivalent but gives you a chance to remove the handler.

```
// Add Custom Module Level Variables Here **
EpiTextBox etb;

public void InitializeCustomCode()
{
	...
	// End Wizard Added Custom Method Calls
	etb = (EpiTextBox)csm.GetNativeControlReference("46567b2e-6bc0-4967-be35-a0ec6843838f");
	etb.AfterExitEditMode += new System.EventHandler(this.etb_AfterExitEditMode);
}

public void DestroyCustomCode()
{
	...
	// Begin Custom Code Disposal
            etb.AfterExitEditMode -= new System.EventHandler(this.etb_AfterExitEditMode);
	// End Custom Code Disposal
}

private void etb_AfterExitEditMode(object sender, System.EventArgs args)
{
	// **Place Event Handling Code Here**
	oTrans.Update();
}
```

---

<div class="post-metadata">

**Author:** ![DaveS](https://www.epiusers.help/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@DaveS](https://www.epiusers.help/u/DaveS)\
**Post date:** [December 29, 2020, 8:08pm UTC](https://www.epiusers.help/t/job-work-flow-barcode-scanning-how-to/73848/19 "2020-12-29T20:08:48Z")

</div>

Thanks guys. I can see I’m hitting the oTrans.Update() breakpoint in the debugger, but I’m still having to click the Save button after because it’s not writing to the db otherwise. I’m thinking the timing might be too early since maybe the Add New? and my BPM hasn’t run yet.  
Any ideas?  
BTW I used the code from Adam.  
Also, if I can’t get something working along those lines, I was wondering if a barcode scanner is out there that would support multiple suffixes to the barcode payload e.g. Tab, Save, Exit, Reload the Form. Without it saving those suffixes to the Key1 field used for Job#. Dunno if I’ll need any pauses.  
I could setup hotkeys to support that. The reason I mention Exit and Reload the Form is because nothing else is working so that I can scan again, then tab, then save after the first scan e.g. New and Clear don’t work.  
I know I could have a hotkey for Exit, but I wouldn’t know how to reload the form. BTW, I’m also going to need to automate starting this form when the pc is restarted.

---

<div class="post-metadata">

**Author:** ![DaveS](https://www.epiusers.help/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@DaveS](https://www.epiusers.help/u/DaveS)\
**Post date:** [December 31, 2020, 4:57pm UTC](https://www.epiusers.help/t/job-work-flow-barcode-scanning-how-to/73848/20 "2020-12-31T16:57:15Z")

</div>

Added a custom control that gets tabbed to after Key1 with this code and it works now.

```cs
	private void epiTextBoxC1_AfterEnterEditMode(object sender, System.EventArgs args)
	{
		// **Place Event Handling Code Here**
		oTrans.Update();
	}

```

---

<div class="post-metadata">

**Author:** ![DaveS](https://www.epiusers.help/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@DaveS](https://www.epiusers.help/u/DaveS)\
**Post date:** [January 4, 2021, 3:37pm UTC](https://www.epiusers.help/t/job-work-flow-barcode-scanning-how-to/73848/21 "2021-01-04T15:37:46Z")

</div>

My remaining 2 issues for completing this are:

1. How to do get the next scan(s) after the first one to work as I’ve mentioned prior. What might work is if I can simply automatically close and reopen the form from just after the oTrans.Update() in epiTextBoxC1\_AfterEnterEditMode, but I don’t know how.
2. When the no monitor “headless” PC boots I can get it to start with the following shortcut in a sysconfig that I created by File, Send as File when the form was loaded, but go figure that it starts with the List Tab having focus. How to get it to start with the Detail tab having focus?

```xml
  <Shortcut>
    <Company>ACME</Company>
    <Plant>AcmeMfgSys</Plant>
    <AppServerURL>net.tcp://EPICOR/ERPTEST</AppServerURL>
    <DateTime>1/4/2021 8:09:51 AM</DateTime>
    <Originator>My Name</Originator>
    <Process>
      <ProcessID>UDSCANPT</ProcessID>
      <Description>Scan</Description>
    </Process>
    <RecordIDS KeyFields="Key1~Key2~Key3~Key4~Key5" KeyFieldsType="System.String~System.String~System.String~System.String~System.String" TableName="UD38" DataSourceType="UD38DataSet" />
    <Search>
      <NamedSearch>Search Name</NamedSearch>
      <SearchCriteria>Search Criteria</SearchCriteria>
    </Search>
  </Shortcut>

```

[Next page](https://www.epiusers.help/t/job-work-flow-barcode-scanning-how-to/73848.md?page=2)
