I know this is a long shot, but I have been dealing with a minor run-time error for a while now on an otherwise very stable customization build on Quote Entry.
Sometimes and at random, when the form is first loaded, I get the following error:
Application Error
Exception caught in: Erp.UI.QuoteEntry
Error Detail
Message: Object reference not set to an instance of an object.
Program: Erp.UI.QuoteEntry.dll
Method: findActivePanel
Line Number: 2210
Column Number: 29
Client Stack Trace
at Erp.UI.App.QuoteEntry.QuoteForm.findActivePanel() in c:_Releases\ERP\UD10.1.400.11\Source\Client\UIApps\QuoteEntry\forms\QuoteForm.cs:line 2210
at Erp.UI.App.QuoteEntry.QuoteForm.OnClickMiscTool(String ToolKey) in c:_Releases\ERP\UD10.1.400.11\Source\Client\UIApps\QuoteEntry\forms\QuoteForm.cs:line 3268
Interestingly, after this error occurs, the form is focused correctly, but one of the custom sheet’s I’ve added onto the summaryLineSheet1 panel is focused. When the customization does not experience this error, the form is focused to the summaryPanel1, as I’ve told it to do in the QuoteForm_Load method.
The findActivePanel method appears to be a native method, as does the subsequent OnClickMiscTool method, so it’s interesting that the error is around these methods.
Good find, yes it appears that there is a method that is inside of InitializeCustomCode that does in face hide a native panel.
Not sure why this is there though.
It’s interesting because there a bunch of native panels that are explicitly told to be visible in this method, and one that is told to be invisible.
private void ShowSalesPanel()
{
// display any panels that are not currently visible.
Erp.UI.App.QuoteEntry.MainPeopleSheet PeoplePanel = (Erp.UI.App.QuoteEntry.MainPeopleSheet)csm.GetNativeControlReference(“cdcd04d1-36af-4ed9-b2fe-85bbf1125cb5”);
Erp.UI.App.QuoteEntry.SalespersonPanel SalesPanel = (Erp.UI.App.QuoteEntry.SalespersonPanel)csm.GetNativeControlReference(“16feaa5b-fecf-4695-9693-9633844b7d89”);
SalesPanel.Visible = true;
Most likely … yeah it should fix it… assuming there isn’t anything else hiding that shouldn’t be … Look in Tools-> XML-> Custom Properties there could be other Hidden Panels there.