Anyone have any ideas how to accomplish this? For the time being, I advised the user could add new order lines in the grid on the Summary tab, but I’m just curious if this aspect can be controlled as well.
I was able to move the Lines tab to the first tab and the list tab to the first tab in the sub sheet. I then saved layouts and the screen opens to the lines entry.
Other option is move the List tab to the first tab in the lines tab and leave the lines tab position in the current location.
I moved the items around and selected Tools > Save Layouts. Closed out of Epicor and reopened. Then opened the form. The Summary tab defaults. Start the sales order and then move to the lines tab and the list is default showing because it is first.
Our users noticed this as well. Since we have a customization on order entry already, we captured BeforeToolClick and checked to see if we’re on the Lines List Tab. If we are, we handle the click and make a call to oTrans.GetNewOrderDtl. This keeps the focus on the list tab instead of moving to the Detail tab
Would you mind sharing your code? I cant seem to get mine to work. I can successfully check if the list tab is active, but when I call GetNewOrderDtl it still reverts back to the detail tab.
I think you might just be missing the args.Handled = true;
Here is our code section. We do a few more checks to verify we’re on the right tab and the objects are what we expect them to be.
// if selected sheet is lines list, add a new line and don't redirect focus to detail tab
if(sender is Erp.UI.App.SalesOrderEntry.SalesOrderForm)
{
if(((Erp.UI.App.SalesOrderEntry.SalesOrderForm)sender).ActiveControl is Erp.UI.App.SalesOrderEntry.SheetTopLevelPanel)
{
if(((Erp.UI.App.SalesOrderEntry.SheetTopLevelPanel)((Erp.UI.App.SalesOrderEntry.SalesOrderForm)sender).ActiveControl).EpiSelectedSheet == "sheetLine" && ((Erp.UI.App.SalesOrderEntry.SheetTopLevelPanel)((Erp.UI.App.SalesOrderEntry.SalesOrderForm)sender).ActiveControl).ActiveControl is Erp.UI.App.SalesOrderEntry.SheetLinePanel && ((Erp.UI.App.SalesOrderEntry.SheetLinePanel)((Erp.UI.App.SalesOrderEntry.SheetTopLevelPanel)((Erp.UI.App.SalesOrderEntry.SalesOrderForm)sender).ActiveControl).ActiveControl).ActiveControl is Erp.UI.App.SalesOrderEntry.LineListPanel)
{
oTrans.GetNewOrderDtl();
args.Handled = true;
}
}
}