A little back story to understand :
My company uses BarTender in Epicor to manage labels. However, by my understanding is its Frankenstein-ed together in order to work. I’m not sure how other companies use these two together, but this is what this company ended up doing long before me. Anyways, we select and build label data on the Part Maintenance Screen (Shown Below)
Then we use a Labels by Job application to pull up and print the logic called out on the Part Maintenance application (Shown Below).
Here is the purpose for the post:
I have been trying to create a new ‘button’ on the Part Maintenance application to use for the Part Description. Creating the button wasn’t difficult and getting it to load in the label application was not hard either. The issue I kept running into was telling the label program to replace the new button place holder “Pd” with the parts description. After about a week or so trying to get this to work, I finally got it to replace the “Pd” value with the actual part description. However, I am not the best at C# so I am trying to do all this based on existing code and examples. I was wondering if someone could look at this and tell me if this will cause any potential problems or issue the way I have it set up.
This is the Lookup/Defining section of the Code:
private void epiButtonLookup_Click(object sender, System.EventArgs args)
{ //start
// ** Place Event Handling Code Here **
EpiTextBox etxtJob = (EpiTextBox)csm.GetNativeControlReference("71c3e8b2-bf25-42ff-b952-8dab2e16107a");
EpiTextBox etxtPartNum = (EpiTextBox)csm.GetNativeControlReference("4b8e7b4e-33f9-4abb-9835-214475913e95");
EpiTextBox etxtCustPartNum = (EpiTextBox)csm.GetNativeControlReference("b642bbae-c1a2-46c0-af58-f18ddcf8f849");
EpiTextBox etxtRev = (EpiTextBox)csm.GetNativeControlReference("4c89e6e7-58c9-4429-8c63-7016452bea21");
EpiTextBox etxtCustPartRev = (EpiTextBox)csm.GetNativeControlReference("8539bf33-2f02-4628-8608-9cc1ad7d687a");
EpiTextBox etxtPartDesc = (EpiTextBox)csm.GetNativeControlReference("853c6e43-34b5-4550-b168-c7d1a8891532");
EpiTextBox etxtQtyToPrint = (EpiTextBox)csm.GetNativeControlReference("52b6eb17-2ee3-4ccf-a590-a339bc939101");
EpiUltraCombo eucLabelType = (EpiUltraCombo)csm.GetNativeControlReference("8ea2ea23-31ed-491d-bf42-8099011a8aa3");
EpiUltraCombo eucBTForm = (EpiUltraCombo)csm.GetNativeControlReference("1dbd4287-f290-42e5-ac79-deabcceca732");
EpiTextBox etbOrigBTForm = (EpiTextBox)csm.GetNativeControlReference("d5c05d24-2f71-48ac-9aea-5e68dbccc419");
EpiUltraCombo eucPrinterList = (EpiUltraCombo)csm.GetNativeControlReference("fd24ce6a-266b-4e8f-877e-88562f91239c");
EpiTextBox etbOrigPrinterForm = (EpiTextBox)csm.GetNativeControlReference("8be45d21-ad5e-4f94-a1e3-04830515b651");
EpiTextBox etxtLayout = (EpiTextBox)csm.GetNativeControlReference("32923fa4-0cee-48a9-bb03-fd04d9dacfcb");
EpiButton ebutton = (EpiButton)csm.GetNativeControlReference("931f3689-0cca-4a3e-b89a-75e3b1f174b4"); //? forgot to load valid name
EpiButton ebuttonLoadSerials = (EpiButton)csm.GetNativeControlReference("67e303bd-d2f5-4b5c-9300-6157814bdad5");
EpiUltraGrid gridComments = (EpiUltraGrid)csm.GetNativeControlReference("f5de78b9-24b3-4b3f-a3c4-4b2d53bade91");
EpiUltraGrid gridLabel = (EpiUltraGrid)csm.GetNativeControlReference("cb335fb6-d957-485a-8333-0da630a2ac5f");
EpiUltraGrid gridSerials = (EpiUltraGrid)csm.GetNativeControlReference("fc13911b-15f9-40d5-8668-370e6c0663e6");
EpiTextBox etxtWS = (EpiTextBox)csm.GetNativeControlReference("3cbdf81a-abd7-464d-b556-9673d10fed8b");
Following the Existing Code, this is what I did (//Bekka Added This):
AllData = AllData.Replace(“Rv”,txtTalonRev + " "); //talon rev
AllData = AllData.Replace(“Pd”,etxtPartDesc.Value + " “); //Bekka Added This
AllData = AllData.Replace(“Sn”,”~Ym~~SN~ "); //change to ~SN~ so code below can process (also is a Ym)
When I tested it , it worked. Although, I don’t know if there are any potential issues when you use etxt vs assigning it to another variable first?? I think it is fine, but would like to verify this before finishing my work instructions for IT to do this.