# Caveat: Hiding Controls
**Category:** [Epicor ERP 10](https://www.epiusers.help/c/e10/5)
**Created:** 2016-12-28 19:08 UTC
**Views:** 6778
**Replies:** 30
**URL:** https://www.epiusers.help/t/caveat-hiding-controls/36730
---
## Post #1 by @Chris_Conn
I just wanted to make an issue aware just in case anyone else stumbles across it.
I completely revamped my MES WorkQueue screen. I have hidden all of the tabs on my page except for a new one I created.
When I open or close the MES WorkQueue screen I get an access violation for:
trans_AfterResourceGroupSearch
I decompiled the code for the form and I can see that method tries to access a tab with the title "Job Details". I unhide the "Job Details" tab, the problem goes away.
Strange, I wouldn't expect for the control to not be found because it was hidden. I try to get tricky and rename my tab to "Job Details" - well that doesn't work either I because since I only have one tab, the tab title ("Job Details") doesn't actually display. If put a second tab (doesn't matter what I call it), the tabs show back up and everything works.
So lesson learned.
---
## Post #2 by @josecgomez
Yeah this happens all over the place in Epicor. A lot of the native controls can't be hidden / removed easily
---
## Post #3 by @Chris_Conn
Is there a way to change a controls parent? I tried to grab in the control tree and drag but no dice :tada:
---
## Post #4 by @Chris_Conn
Or how to get rid of a nagging auto-hide dock panel?
Visible = false; nope
Width/Height = 0; nope
---
## Post #5 by @josecgomez
Screen shot... what do you need to remove?
---
## Post #6 by @Chris_Conn
---
## Post #7 by @josecgomez
Just undock it (Push Pin)
Tools -> Save Layout then open Customization mode, make a small change and save it.
---
## Post #8 by @Chris_Conn
I swear I've tried that several times, but maybe since you said it will work this time. (You have the magic touch)
Here is the tree view btw
---
## Post #9 by @josecgomez
No Exit customization mode,
Open the Form
UnDock It (Push Pin)
Then go to Tools or Actoins -> Save Layout
Then go to Tool -> Customization
Make a Change
Save it
---
## Post #10 by @Chris_Conn
Ahhhh I forgot the Save Layout step :blush:
Thanks! :gift: :tada: :confetti_ball:
---
## Post #11 by @Chris_Conn
Well you're on a roll for Epicor Trivia - why not raise the ante:
Why can I not use csm and get ref to form, and the call Close()?
```cs
Erp.UI.App.WorkQueueEntry.WorkQueueForm frm = (Erp.UI.App.WorkQueueEntry.WorkQueueForm)csm.GetNativeControlReference("2dcd1674-5e34-4d98-b493-c75747027376");
frm.Close();```
---
## Post #12 by @josecgomez
You don't need to use CSM to get a refernece to the form you already havea reference to the form
See your image 2 posts Up... On the left tree WorkQueueForm (that is your reference) just do WorkQueueForm.WhatEverYouWant();
---
## Post #13 by @Chris_Conn
Oh. I thought that the system controls could not be accessed like that. For example, I cant just use Button1.Click(). That only applies to children of the form then?
Btw - the ref may have worked - I placed the code in the wrong button click handler..... Happy Hump Day :stuck_out_tongue_winking_eye:
---
## Post #14 by @josecgomez
The form is special :-)
*short bus kinda special*
---
## Post #15 by @Chris_Conn
As long as there's room for me on there, I am happy.
http://cdn.lolwot.com/wp-content/uploads/2015/08/20-animals-making-some-seriously-crazy-faces-2.jpg
---
## Post #16 by @Banderson
Hey Chris,
If you ever have time, I would love to see a rundown of what you have done to your work queue screen. Just some screen shots of what you changed and what the business reasoning was. I know that I don't have the technical expertise to do what you did, but having benchmarks from other users who have done creative things can be useful for knowing what's possible and who/what to ask to get something more useful. (I can't google something if I don't even know it exists!)
Again, I'm just curious to see what you came up with because we have a huge problem with clocking in and out of operations and I'm grasping at anything that can be easier for shop floor workers.
Brandon
---
## Post #17 by @Chris_Conn
By all means I'd love to share. I'm nearly obligated by the fact that none of it could have happened without this website!
Here is my modified WorkQueue screen. By default I list all open jobs (this can easily be changed to filter by default). The user general will only use the dropdown on the top right to filter jobs on his machine but if needed, they can filter by job number (accepts partials) or dates.
User selects a job and pressed start button then gets a confirmation to start job. At which time, the screen closes.
Additionally, the UltraGrid does some really amazing grouping easily like this where jobs are grouped by machine:
---
## Post #18 by @Chris_Conn
For my Reporting Qty screen I've made changes that allow for the user to only report the number of boxes (the Part entry allows us to enter how many pieces per box are std). Then it does the math and calculates the item qty to report.
Once reported, there is a BPM which auto prints the labels to the proper printer based on workstation, it prints a label type (style) defined in Part entry, and also prints how ever many labels per box was assigned in the Part Entry screen.
Also I added a way to see what PN you are reporting as well as button to print a master/skid label.
---
## Post #19 by @Banderson
Since you've hidden all of the other tabs, and since you said it closes the screen, I'm assuming that end end the job with the end activity button on the main MES screen? So using this method you would lose the ability to mass complete correct? Or did you add another button somewhere that isn't shown?
Definitely cool stuff.
Or maybe I should give you a minute to finish. I didn't realize you weren't done. oops.
---
## Post #20 by @Chris_Conn
In this particular implementation you can't mass complete BUT, it would pretty straight forward to bring back a button to do so for all selected jobs.
---
## Post #21 by @Banderson
yeah, different types of business between the two of us. We have a lot of small quantities to make custom engineered product. 20 is a lot for a qty for us, so to use E-10 as designed we have a lot of operations to report. It's pretty overwhelming and were having trouble figuring out how to manage it.
I really like the part number and description add, the asm and mtl sequence numbers are a bit cryptic.
Are you using SSRS for the label printing?
---
## Post #22 by @Chris_Conn
No, my company still has banned me from accessing the SSRS server to get everything working properly (true story, it took me 2 months to get permissions into E10 test database).
I use bartender and some custom code to generate "trigger files", it's not too difficult and very flexible.
If you would like the code to get the PN/Desc on your screen I'd be happy to share it.
---
## Post #23 by @Banderson
We have bartender too. We use it mostly with excel right now dropping out CSV files. It's a lot easier to make the reports/labels in there. I just started dabbling with SSRS and have a lot to learn. I just figured out how to drop the trigger file from the BAQ export a couple of weeks ago so that lends itself to using bartender more. I'm sure I will learn how to add the custom code to add that into a button someday soon.
Thanks for showing what you've been working on.
---
## Post #24 by @priya
[quote="josecgomez, post:12, topic:36730"]
tree WorkQu
[/quote]
I tried to close a form that does not work...
My trials
using GUID
EpiBaseForm frm = (EpiBaseForm)(csm.GetNativeControlReference("88EEE34C-4CE7-4fc6-902C-B55512338CC9"));
frm.Close();
using form collection :
Form formtoclose=null;
foreach (Form f in Application.OpenForms)
{
```
if (f.Name == "ReqEntryForm")
{
formtoclose = f;
}
}
if(formtoclose!=null)
formtoclose.Close();
Even hide / time delay nothing works to skip the error . May be request entry form highly dependent and cant be closed???
Form is getting closed but getting following error. what may be the issue. Form name: requisition entry form


---
## Post #25 by @josecgomez
What are you trying to do? This isn't related to the above post...
Looks like you are trying to close a form? Please open a new thread.
---
## Post #26 by @priya
[quote="Chris_Conn, post:11, topic:36730, full:true"]
Well you’re on a roll for Epicor Trivia - why not raise the ante:
Why can I not use csm and get ref to form, and the call Close()?
```
Erp.UI.App.WorkQueueEntry.WorkQueueForm frm = (Erp.UI.App.WorkQueueEntry.WorkQueueForm)csm.GetNativeControlReference("2dcd1674-5e34-4d98-b493-c75747027376");
frm.Close();```
```
[/quote]
Well you’re on a roll for Epicor Trivia - why not raise the ante:
Why can I not use csm and get ref to form, and the call Close()?
```
Erp.UI.App.WorkQueueEntry.WorkQueueForm frm = (Erp.UI.App.WorkQueueEntry.WorkQueueForm)csm.GetNativeControlReference("2dcd1674-5e34-4d98-b493-c75747027376");
frm.Close();```
```
This is already posted and you have given some suggestion for closing the form. that's why continued in this thread
---
## Post #27 by @josecgomez
What are you trying to do? and from where?
---
## Post #28 by @priya
[quote="priya, post:26, topic:36730"]
have given some suggestion for closing the form. that’s why continued in this thread
[/quote]
My requirement :
**Deploy the Requisition To-Do List on a separate stand-alone menu item instead of having it as an action item in the Requisition Entry screen.**
In the requisition Entry i created one customization. In the page load of the customization i have done this code
oTrans.InvokeToDoList();
So it is launching “requisition todolist” , but while closing todolist , requisition entry opens.
I want to close requisition entry.
so i coded the following codes on page load to close the requisition entry. It is closing but with error
Form formtoclose=null;
foreach (Form f in Application.OpenForms)
{
```
if (f.Name == "ReqEntryForm")
{
formtoclose = f;
}
}
if(formtoclose!=null)
formtoclose.Close();
```
EpiBaseForm frm = (EpiBaseForm)(csm.GetNativeControlReference(“GUID”));
frm.Close();
error screenshots i already uploaded in this thread. please browse up the post and check.
object reference error after closing. any suggestion?
---
## Post #29 by @Chris_Conn
If I am understanding correctly, you want to close an unrelated window. You cant do that with Epicor, but there may some underlying Windows tricks you can use to hunt down and kill the desired window. The question is, would it require "unsafe" code, because Epicor does not allow unsafe code in customizations (it requires a compiler directive).
---
## Post #30 by @priya
any way let me learn. plz share the sample code. Thanks a ton for your time and reply:)
Also i need some suggestion for this. plz check the below link
https://jdoyle1983.wordpress.com/2012/05/30/epicor-utilizing-customization-of-non-menu-bound-screen/
This is way is it possible to use for my requirement to make to requisition todolist as a standalone screen.
---
## Post #31 by @roywebs
In the Batch Invoice Printing, I tried to do this following the steps outlined by Jose below, but it did not work. The sidebar keeps returning if I move the mouse over that part of the form.
These are the steps:
* No Exit customization mode,
* Open the Form
* UnDock It (Push Pin)
* Then go to Tools or Actoins -> Save Layout
* Then go to Tool -> Customization
* Make a Change
* Save it
Is there something I am missing?
---
**Canonical:** https://www.epiusers.help/t/caveat-hiding-controls/36730
**Original content:** https://www.epiusers.help/t/caveat-hiding-controls/36730