Tracking down customization error

We do have Order Entry customized. Can anybody shed any light on where we should start looking, the full error message is:

Exception caught in: mscorlib

Error Detail

Message: Exception has been thrown by the target of an invocation.
Inner Exception Message: Object reference not set to an instance of an object.
Program: CommonLanguageRuntimeLibrary
Method: InvokeMethod

Client Stack Trace

at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Ice.Lib.Customization.CustomScriptMethodInvoker.InvokeScriptMethod(MethodInfo scriptMethod, Object[] parameters)
at Ice.Lib.Customization.CustomScriptMethodInvoker.InvokeInitializeGlobalVariables(CustomScriptManager customScriptManager)
at Ice.Lib.Customization.CustomScriptManager.b__f()
at Ice.Lib.Customization.CustomScriptManager.TryActionShowExceptionBoxIfException(Action action, String exceptionBoxTitle)

Inner Exception

Object reference not set to an instance of an object.

Inner Stack Trace

at Script.InitializeGlobalVariables(CustomScriptManager csm)

Thank you,
Mike

It’s hard to track it down on our end. The error at it’s core is due to
trying to access something that doesn’t exist.

In my experience, it’s generally either been trying in the wrong guid when
using GetNativeControlReference or trying to access a recordset before
actually ensuring that records exist in said recordset.

The quickest way to troubleshoot is to start commenting out large blocks of
code

That error is happening before any custom code runs. That generally means bad control of some sort. Start looking at your control config in custom XML editor. Is this an upgraded screen?

Yes, it is an upgraded screen.

What should I be looking for in control config? Thank you, Mike

If you are getting the error when you first open the form, open in Customization Maintenance and select Actions --> Verify Customization. This will give you a list of errors and warnings and give you the ability to correct them.

I found it by deleting custom controls one by one in the Demo database. Thanks! Mike