Using the Epicor MES Start Production Activity, when the form loads, I will like to dynamically set the Job Number textbox via customization. I did reference the textbox by guid and it does not work. My code is below.
Do I have to use a user defined textbox to accomplish this?
public class Script
{
// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
// Begin Wizard Added Module Level Variables **
// End Wizard Added Module Level Variables **
// Add Custom Module Level Variables Here **
Epicor.Mfg.UI.FrameWork.EpiTextBox txtJobNum;
public void InitializeCustomCode()
{
// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
// Begin Wizard Added Variable Initialization
// End Wizard Added Variable Initialization
// Begin Wizard Added Custom Method Calls
// End Wizard Added Custom Method Calls
this.txtJobNum = (Epicor.Mfg.UI.FrameWork.EpiTextBox)csm.GetNativeControlReference("2233c0f7-d359-4959-8387-2a9b8395149b");
}
public void DestroyCustomCode()
{
// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
// Begin Wizard Added Object Disposal
// End Wizard Added Object Disposal
// Begin Custom Code Disposal
// End Custom Code Disposal
}
private void StartProdForm_Load(object sender, EventArgs args)
{
// Add Event Handler Code
this.txtJobNum.Text = "215478";
}
}