Opening customer tracker focuses wrong tab

When opening customer tracker Epicor focuses the Orders tab. We would like it to focus the Customer > Detail tab. Base form works okay and correctly focuses the Customer > Detail tab

Somehow the customization we have on this screen is focusing the wrong tab by default. We’ve tried to save layouts and removed personalizations and cleared cache. Tried saving when on the Customer > Detail tab. Played with the tab stops. Nothing seems to help.

Is there a way in customization mode to explicitly say which tab you want to have focus when the screen opens?

Short screen cap of problem: wrong-tab-focused.mp4 (736.5 KB)

Does your Initialize or Form Load code on the customization focus a specific control?

I think I might be on to something. There is a customized tab on the Orders tab called “Open Releases”

I think that it is doing some initialization and then retaining focus after the load completes. So I would need to explicitly say, focus the Customer > Detail tab, but I’m not sure how or where to write such a thing.

That appears to be base code, you cant change that. Perhaps try to focus the tab you want, save layout, then open the customization (make some subtle little ui change, like move something) then save the customization

Thank you for your suggestions. It still focuses the wrong tab.

I changed the size of the customer field on the main tab, made it a little wider and saved. I cleared cache and even deleted the Epicor cache folder from my PC to make sure the cache was cleared. Unfortunately it still focuses the wrong tab.

We’ll reach out to our consultants that made that extra tab and then have them explicitly focus the customer > detail > customer ID field we want to be focused on screen load.

This part is crucial to make this work. You have to save the layout (personalization) to make it stick. Usually just saving the customization doesn’t do it.

Side note, if someone does figure out to to switch to a different tab in code, I would be grateful for a tip.

Just focusing a control on the desired tab should work.

So I swear I have tried that before and it didn’t work, So I went off to try and prove you wrong, because I’m a jerk like that. But what do you know, it works… now of course I can’t remember where I was trying to make it work, but when I remember I’ll give it a shot. (I was probably trying to focus on the tab specifically, and that I don’t think works, but a control does)

Thanks Chris!

I <3 you too Brandon :stuck_out_tongue: Glad it worked!

1 Like

I am having the same issue of Part Entry opening to wrong tab after I embedded a dashboard. How can I get the form to focus on the Part.PartNum field when opening?

Good Morning,

I feel like I keep whacking my head against the wall trying to get this &*!@# new tab to not receive focus when sales order entry is opened.
Help!
I’ve added a tab, per below, Internal Comments under the Lines / Comments tab.
Now when I open the customization it goes to the Summary tab first ~ This is good! However when I click on Lines it goes straight to comments / internal comments tab.
I have messed with saving layouts then tweaking and then tweaking and saving layouts and every scenario I can drum up for an hour. no go.
Any suggestions?

Thanks very much,
Nancy

Did you try deleteing your personaliztions for the form?

1 Like

Yep!

Do all users experience the same?

Yes :frowning:

This code is from a form that’s still in development and I haven’t touched in a year, so I do not know why I’m setting one panel to null and not the other. But this corrects the default tabs after I added some custom ones, and places the cursor in the first key field. It’s in the Form Load event. You can find the panels in the tree view while in customization mode. You need to focus/select controls in backwards order. From your image, I think you want to focus that Sales Order panel under Comments first, then the Detail panel under Lines, then the Summary panel.

var panel1 = (Erp.UI.App.HelpDeskEntry.Panels.TaskSubPanels.TaskGeneralPanel)this.csm.GetNativeControlReference("cfc556c3-d88b-45f9-91bd-420ae1860890");
panel1.Focus();
panel1 = null;
var panel2 = (Erp.UI.App.HelpDeskEntry.CaseRelatedToPanel)csm.GetNativeControlReference("a4eb0d8f-0737-4460-b89d-36e5451f4f4a");
panel2.Focus();
var keyField = (EpiTextBox)csm.GetNativeControlReference("ba250372-d3b3-42eb-956b-01b8081382e3");
keyField.Select();

(I’m assuming you know how to find the guid for the native controls, so please ask if you don’t…and it’s just occurred to me that I could probably cast those panels to Control, since all I’m doing is focusing them. I said this was still in development, right?)

3 Likes

Hi Ashley,

Yes, I was able to get this working also in the Form Load event. Your tip to focus in backwards order really did the trick. Thank you!

Nancy

2 Likes

Several folks on 10.2.500 and later on EUG have reported the same issue. Especially when a Personalization + Customization are in play.

Replicate Customer Tracker:

  1. Have a Customization
  2. Personalize a grid (Save Layouts)

If you pick the Customization Layer its fine, if you pick the Personalization Layer – you will see for example Integrations tab have focus.

2 Likes

Not sure if it’s relative but… In 10.2.300, I found it happen in to a new customization to CaseEntry randomly (maybe Save Layouts was pressed in customization mode?). After looking at the base DLL, I noticed UI logic in the base form to move focus to the keyfield in the OnLoaded() event. The only workaround I found was to add an EventHandler for the form Shown event to move focus after the base form was done loading.

I figured it out… If you use Save Layouts as a developer, it will remember the Tab and Docking as usual. However on Customer Tracker for example (probably many other forms), because the OnLoad focuses it to the KeyField you have the perception that it didnt save it… until you run it from a Personalization layer, then it does honor the Dock Layout.

Chances are that you have Dock Layouts on the Customization, it may be accidental (unpinning, pinning a tab).

You can fix it by viewing the XML of the Customization and removing the Dock Layout or modifying it to change the SelectedTabIndex.in the XML

How does Epicor decide which tab to select? It looks at the SelectedTabIndex in the LayoutXML


Also if you add your own Custom Tab you probably tinker with Save Layouts, just make sure you focus back on the Main Tab before hitting Save Layouts so it can try to updated the SelectedTabIndex with 0 usually.

4 Likes