# Customization Code only works in Developer Mode

**URL:** <https://www.epiusers.help/t/customization-code-only-works-in-developer-mode/44000>\
**Category:** Epicor ERP 10\
**Tags:** customization\
**Created:** [April 13, 2018, 1:39pm UTC](https://www.epiusers.help/t/customization-code-only-works-in-developer-mode/44000 "2018-04-13T13:39:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jrademacher](https://www.epiusers.help/user_avatar/www.epiusers.help/jrademacher/32/9796_2.png) [@Jrademacher](https://www.epiusers.help/u/Jrademacher)\
**Post date:** [April 13, 2018, 1:39pm UTC](https://www.epiusers.help/t/customization-code-only-works-in-developer-mode/44000/1 "2018-04-13T13:39:28Z")

</div>

I am trying to use the Form Event Wizard to set a database field to the product of some UD fields upon entering a value in the UD fields on the Opportunity/Quote Entry form. The code compiles with no errors or warnings, and works as intended when testing in developer mode, but the code doesn’t trigger after I import it. Here’s the Form Event Handler Code:

private void QuoteMtl\_AfterFieldChange(object sender, DataColumnChangeEventArgs args)  
{  
// \*\* Argument Properties and Uses \*\*  
// args.Row[“FieldName”]  
// args.Column, args.ProposedValue, args.Row  
// Add Event Handler Code  
switch (args.Column.ColumnName)  
{

```
	case "A1QtyBox_c":
				
		if(Convert.ToString(args.Row["IUM"])=="IN")
		{
			args.Row["QtyPer"]=Convert.ToDecimal(args.Row["A1QtyBox_c"])*Convert.ToDecimal(args.Row["A1LengthBox_c"]);
		}
		else if(Convert.ToString(args.Row["IUM"])=="EA")
		{
			args.Row["QtyPer"]=Convert.ToDecimal(args.Row["A1QtyBox_c"]);
		}
		else if(Convert.ToString(args.Row["IUM"])=="SQIN")
		{
			args.Row["QtyPer"]=Convert.ToDecimal(args.Row["A1QtyBox_c"])*Convert.ToDecimal(args.Row["A1LengthBox_c"])*Convert.ToDecimal(args.Row["A1Width_c"]);
		}
	
	break;

	case "A1LengthBox_c":

		if(Convert.ToString(args.Row["IUM"])=="IN")
		{
			args.Row["QtyPer"]=Convert.ToDecimal(args.Row["A1QtyBox_c"])*Convert.ToDecimal(args.Row["A1LengthBox_c"]);
		}
		else if(Convert.ToString(args.Row["IUM"])=="EA")
		{
			args.Row["QtyPer"]=Convert.ToDecimal(args.Row["A1QtyBox_c"]);
		}
		else if(Convert.ToString(args.Row["IUM"])=="SQIN")
		{
			args.Row["QtyPer"]=Convert.ToDecimal(args.Row["A1QtyBox_c"])*Convert.ToDecimal(args.Row["A1LengthBox_c"])*Convert.ToDecimal(args.Row["A1Width_c"]);
		}
	
	break;

	case "A1Width_c":

		if(Convert.ToString(args.Row["IUM"])=="IN")
		{
			args.Row["QtyPer"]=Convert.ToDecimal(args.Row["A1QtyBox_c"])*Convert.ToDecimal(args.Row["A1LengthBox_c"]);
		}
		else if(Convert.ToString(args.Row["IUM"])=="EA")
		{
			args.Row["QtyPer"]=Convert.ToDecimal(args.Row["A1QtyBox_c"]);
		}
		else if(Convert.ToString(args.Row["IUM"])=="SQIN")
		{
			args.Row["QtyPer"]=Convert.ToDecimal(args.Row["A1QtyBox_c"])*Convert.ToDecimal(args.Row["A1LengthBox_c"])*Convert.ToDecimal(args.Row["A1Width_c"]);
		}
	
	break;

	case "A1TotalMTLPrice_c":
	
		if(Convert.ToString(args.Row["IUM"])=="EA")
		{
			args.Row["EstUnitCost"]=Convert.ToDecimal(args.Row["A1TotalMTLPrice_c"])/Convert.ToDecimal(args.Row["QtyPer"]);
		}
							
	break;

}

```

}

Anyone have a clue on what’s going on? I’m incredibly new to C# so I’m learning all this on the fly.

Also I’m working in Epicor 10.2.100.8

---

<div class="post-metadata">

**Author:** ![Banderson](https://www.epiusers.help/user_avatar/www.epiusers.help/banderson/32/50875_2.png) [@Banderson](https://www.epiusers.help/u/Banderson)\
**Post date:** [April 13, 2018, 2:00pm UTC](https://www.epiusers.help/t/customization-code-only-works-in-developer-mode/44000/2 "2018-04-13T14:00:58Z")

</div>

Did you set the menu item to use your customization?

---

<div class="post-metadata">

**Author:** ![Jrademacher](https://www.epiusers.help/user_avatar/www.epiusers.help/jrademacher/32/9796_2.png) [@Jrademacher](https://www.epiusers.help/u/Jrademacher)\
**Post date:** [April 13, 2018, 2:05pm UTC](https://www.epiusers.help/t/customization-code-only-works-in-developer-mode/44000/3 "2018-04-13T14:05:47Z")

</div>

I’m not sure if I did. I just open the form and right click to import the customization. How do I set the menu item?

---

<div class="post-metadata">

**Author:** ![Banderson](https://www.epiusers.help/user_avatar/www.epiusers.help/banderson/32/50875_2.png) [@Banderson](https://www.epiusers.help/u/Banderson)\
**Post date:** [April 13, 2018, 2:08pm UTC](https://www.epiusers.help/t/customization-code-only-works-in-developer-mode/44000/4 "2018-04-13T14:08:53Z")

</div>

you have to go into menu maintenance, and find the form that you are working on (keep in mind it might be in multiple places and you need to set all of them if you want them all to use the same customization). Then at the bottom is a drop down to apply the customization.

If it doesn’t show up there, copy your customization and check the “all companies” check box when you save it. It doesn’t show up unless you check that box. (or do something else with the company stuff but 99% of people just use all companies)

note: I’m on 10.1 but I’m assuming this part hasn’t changed in 10.2

 ![image](https://epiusers.help/uploads/default/original/2X/d/d9a059edf8b67fd1d13ff94b3712e7942f7d988f.png)

---

<div class="post-metadata">

**Author:** ![Jrademacher](https://www.epiusers.help/user_avatar/www.epiusers.help/jrademacher/32/9796_2.png) [@Jrademacher](https://www.epiusers.help/u/Jrademacher)\
**Post date:** [April 13, 2018, 2:50pm UTC](https://www.epiusers.help/t/customization-code-only-works-in-developer-mode/44000/5 "2018-04-13T14:50:24Z")

</div>

Thank you! It’s working now.

---

<div class="post-metadata">

**Author:** ![THulbert](https://www.epiusers.help/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@THulbert](https://www.epiusers.help/u/THulbert)\
**Post date:** [April 13, 2018, 3:16pm UTC](https://www.epiusers.help/t/customization-code-only-works-in-developer-mode/44000/6 "2018-04-13T15:16:00Z")

</div>

Don’t forget to mark the post as solved 🙂
