Creating An Entirely "New" Screen Within Epicor
Modifying existing screens within Epicor is a reasonably straight-forward process. However, what if you want an entirely fresh canvas - a brand new screen that you can build from scratch? You might reasonably assume you would need to get ahold of the source code and create a new set of Business Object / UI DLLs and, while that would certainly work and provide you with a few benefits, you are far better off using this little trick.
Read on to learn how to create an entirely new Epicor screen in our latest Epicor 10 customization example series!
If you are unfamiliar, Epicor comes bundled with a boatload (51 to be exact) UD tables that you can use in any way you can imagine. All 51 of these UD tables have simple UI screens you can add to the menu like so:
The UD tables make a particularly excellent canvas for us because they are so darn simple:
So, if we want to take this screen over and make it our screen, all we’d need to do is wipe out the handful of controls on the screen. Here are a few simple lines of code you can add at the bottom of InitializeCustomCode to give us a completely blank canvas:
public void InitializeCustomCode() { // ** Wizard Insert Location - Do not delete 'Begin/End Wizard AddedVariable Initialization' lines ** // Begin Wizard Added Variable Initialization // End Wizard Added Variable Initialization // Begin Wizard Added Custom Method Calls // End Wizard Added Custom Method Calls //Hide the top Toolbar baseToolbarsManager.Visible = false; //Hide the left side treeview ((Infragistics.Win.UltraWinDock.WindowDockingArea)this.csm.PersonalizeCustomizeManager.ControlsHT["UD01Form.windowDockingArea1"]).Visible = false; //Hide the right side dockable window. ((Infragistics.Win.UltraWinDock.WindowDockingArea)this.csm.PersonalizeCustomizeManager.ControlsHT["UD01Form.windowDockingArea2"]).Visible = false; }
Note my code snippet here assumes you are doing this to UD01. If you are using another UD table for whatever reason, update the reference in those last few lines of code. Now when you run this customization next time you will see a blank canvas:
Now you can pull this into a customization designer and add whatever controls you like, custom code, etc. Remember, we are not using any of the data from this UD table in this process - we are just stealing it’s UI as the basis for a new form. Because you can have an unlimited number of customizations for any given form that means you can create an unlimited number of “new” screens within Epicor using this approach. Have fun!