Customization Corrupted - Two controls with the same name

Error: CS0102 - line 443 (443) - The type ‘Script’ already contains a definition for ‘epiUltraGridC1’

Somehow I ended up with two controls with the same name. I cannot delete either of them, as none of the controls display anymore. I can see them in the code still, but the code is in the auto generated read only section. How can I fix this issue?

Wonder if you can open the custom form in developer mode?

  • and possibly to delete controls from Custom XML
  • or delete from the component tree list (sometimes I’ve had to “cut” a control instead of deleting).

Or if you can load the custom form in Customization Maintenance?
I’ve sometimes been able to clean things up via it’s Actions menu items.

I can see my controls in the read-only code, but they are gone from the treeview. I tried deleting the control from the XML via tools Custom XML editor and it keeps coming back. I am going to export the customization and try editing the exported file now. Hope there isn’t some kind of checksum that will prevent me from re-importing it.

I deleted all references to “epiUltraGridC1” in the exported file, then re-imported it. One of my grids is gone, but at least I was able to recover everything else.

1 Like

You can also fix this error with the customisation maintenance screen.

load the customisation into the screen, then click actions -> Show Custom Data.

Select the offending control and press delete key (on keyboard).

Click yes to delete control.
Click save data.

you should be good now.

7 Likes

You can actually change your name here as well if both controls are needed.

3 Likes

Thank you Brett.

This was a life saver.

Not sure why Epicor decided to duplicate a control, it was a puzzler. I know that no one had worked on that control in months or created a new label in that length of time. So odd…