Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Sales Order Page Causes RTC Crashing After Modification

(0) ShareShare
ReportReport
Posted on by

Hello there,

Has anyone run into this one before?

A field was added to the sales order page. Now It simply crashes the RTC every time I open it.

Even after reverting modifications.

I've tried clearing meta data and recompiling all objects to no avail. Restarting the NAV service etc. I am stumped.

Any help would be appreciated!

Type: System.NullReferenceException
Message: Object reference not set to an instance of an object.
StackTrace:
at Microsoft.Dynamics.Nav.Client.WinClient.ExceptionHandler.<>c__DisplayClass6.<DoRethrowWithCatchException>b__4()
at Microsoft.Dynamics.Nav.Client.WinClient.NavClientErrorHandler.ExecuteAndCatchExceptions(Func`1 execute)
at Microsoft.Dynamics.Nav.Client.WinClient.ExceptionHandler.DoExecute(Func`1 execute)
at Microsoft.Dynamics.Nav.Client.WinClient.ExceptionHandler.DoRethrowWithCatchException(Exception exception, Boolean designMode)
Source: Microsoft.Dynamics.Nav.Client.WinClient
HResult: -2147467261
----------------------------------
Type: System.NullReferenceException
Message: Object reference not set to an instance of an object.
StackTrace:
at Microsoft.Dynamics.Nav.Client.Builder.ExpressionPatternBuilder.InternalBindExpressionPatterns(LogicalControl control, ControlBaseDefinition controlDef, Boolean staticGroup)
at Microsoft.Dynamics.Nav.Client.Builder.ExpressionPatternBuilder.BindExpressionPatterns(LogicalForm parentForm, LogicalControl control, ControlBaseDefinition controlDef)
at Microsoft.Dynamics.Nav.Client.FormBuilder.FormFieldBuilder.DoBuild(ControlDefinition definition, LogicalControl parent, UIBuilderContext context)
at Microsoft.Dynamics.Nav.Client.FormBuilder.ElementBuilderGeneric`1.Build(ElementDefinition definition, LogicalControl parent, UIBuilderContext context)
at Microsoft.Dynamics.Nav.Client.FormBuilder.UIBuildManager.BuildElement(ElementDefinition metadataDef, LogicalControl parent, UIBuilderContext context)
at Microsoft.Dynamics.Nav.Client.FormBuilder.RepeaterBuilder.CreateDefaultRepeater(RepeaterDefinition definition, UIBuilderContext context, RepeaterControl repeater)
at Microsoft.Dynamics.Nav.Client.FormBuilder.RepeaterBuilder.DoBuild(RepeaterDefinition definition, LogicalControl parent, UIBuilderContext context)
at Microsoft.Dynamics.Nav.Client.FormBuilder.ElementBuilderGeneric`1.Build(ElementDefinition definition, LogicalControl parent, UIBuilderContext context)
at Microsoft.Dynamics.Nav.Client.FormBuilder.UIBuildManager.BuildElement(ElementDefinition metadataDef, LogicalControl parent, UIBuilderContext context)
at Microsoft.Dynamics.Nav.Client.FormBuilder.PlaceholderBuilder.BuildChildControls(ControlContainerPlaceHolder definition, LogicalControl parent, UIBuilderContext context)
at Microsoft.Dynamics.Nav.Client.FormBuilder.PlaceholderBuilder.DoBuild(ControlContainerPlaceHolder definition, LogicalControl parent, UIBuilderContext context)
at Microsoft.Dynamics.Nav.Client.FormBuilder.ElementBuilderGeneric`1.Build(ElementDefinition definition, LogicalControl parent, UIBuilderContext context)
at Microsoft.Dynamics.Nav.Client.FormBuilder.UIBuildManager.BuildElement(ElementDefinition metadataDef, LogicalControl parent, UIBuilderContext context)
at Microsoft.Dynamics.Nav.Client.FormBuilder.PageBuilder.BuildContent(ContentAreaDefinition contentArea, LogicalForm form, UIBuilderContext context)
at Microsoft.Dynamics.Nav.Client.FormBuilder.UIPartBuilder.DoBuild(MasterPage definition, BindingManager bindingManager, UIBuilderContext context)
at Microsoft.Dynamics.Nav.Client.FormBuilder.PageBuilder.Build(MasterPage definition, BindingManager bindingManager, UIBuilderContext context)
at Microsoft.Dynamics.Nav.Client.FormBuilder.PageBuilder.Build(MasterPage definition, UIBuilderContext context)
at Microsoft.Dynamics.Nav.Client.FormBuilder.UIBuildManager.BuildPage(MasterPage pageDef, UIBuilderContext context)
at Microsoft.Dynamics.Nav.Client.FormBuilder.InfopartBuilderBase`1.BuildUIPart(MasterPage page, UIBuilderContext partContext)
at Microsoft.Dynamics.Nav.Client.FormBuilder.InfopartBuilderBase`1.CreatePart(TDefinition definition, FormHostControl infopart, UIBuilderContext partContext, Boolean filteringAllowed)
at Microsoft.Dynamics.Nav.Client.FormBuilder.PageInfopartBuilder.CreatePagePart(InfopartPageDefinition infoPartDefinition, FormHostControl infopart, UIBuilderContext partContext, Boolean filteringAllowed)
at Microsoft.Dynamics.Nav.Client.FormBuilder.PageInfopartBuilder.DoBuildPagePartCommon(InfopartPageDefinition definition, LogicalControl parent, UIBuilderContext context, BuildingUIPart type, Boolean filteringAllowed)
at Microsoft.Dynamics.Nav.Client.FormBuilder.PageInfopartBuilder.DoBuildSubForm(InfopartPageDefinition definition, LogicalControl parent, UIBuilderContext context)
at Microsoft.Dynamics.Nav.Client.FormBuilder.PageInfopartBuilder.DoBuild(InfopartPageDefinition definition, LogicalControl parent, UIBuilderContext context)
at Microsoft.Dynamics.Nav.Client.FormBuilder.ElementBuilderGeneric`1.Build(ElementDefinition definition, LogicalControl parent, UIBuilderContext context)
at Microsoft.Dynamics.Nav.Client.FormBuilder.UIBuildManager.BuildElement(ElementDefinition metadataDef, LogicalControl parent, UIBuilderContext context)
at Microsoft.Dynamics.Nav.Client.FormBuilder.PlaceholderBuilder.BuildChildControls(ControlContainerPlaceHolder definition, LogicalControl parent, UIBuilderContext context)
at Microsoft.Dynamics.Nav.Client.FormBuilder.PlaceholderBuilder.DoBuild(ControlContainerPlaceHolder definition, LogicalControl parent, UIBuilderContext context)
at Microsoft.Dynamics.Nav.Client.FormBuilder.ElementBuilderGeneric`1.Build(ElementDefinition definition, LogicalControl parent, UIBuilderContext context)
at Microsoft.Dynamics.Nav.Client.FormBuilder.UIBuildManager.BuildElement(ElementDefinition metadataDef, LogicalControl parent, UIBuilderContext context)
at Microsoft.Dynamics.Nav.Client.FormBuilder.PageBuilder.BuildContent(ContentAreaDefinition contentArea, LogicalForm form, UIBuilderContext context)
at Microsoft.Dynamics.Nav.Client.FormBuilder.CardPageBuilder.DoBuild(MasterPage definition, BindingManager bindingManager, UIBuilderContext context)
at Microsoft.Dynamics.Nav.Client.FormBuilder.PageBuilder.Build(MasterPage definition, BindingManager bindingManager, UIBuilderContext context)
at Microsoft.Dynamics.Nav.Client.FormBuilder.PageBuilder.Build(MasterPage definition, UIBuilderContext context)
at Microsoft.Dynamics.Nav.Client.FormBuilder.UIBuildManager.BuildPage(MasterPage pageDef, UIBuilderContext context)
at Microsoft.Dynamics.Nav.Client.FormBuilder.BuilderSession.CreateLogicalForm(MasterPage metadata, FormState formState)
at Microsoft.Dynamics.Nav.Client.FormBuilder.BuilderSession.CreateLogicalForm(Int32 formId, FormState formState, Int32 retryCounter)
at Microsoft.Dynamics.Nav.Client.FormBuilder.BuilderSession.CreateLogicalForm(Int32 formId, FormState formState)
at Microsoft.Dynamics.Nav.Client.NavRunPagePropertyBagInvokedAction.InvokePropertyBagAction(UISession uiSession)
at Microsoft.Dynamics.Nav.Client.NavPropertyBagInvokedActionBase.InvokeCore(Boolean async, LogicalControl logicalControl, Object state, UISession uiSession)
at Microsoft.Dynamics.Framework.UI.LogicalAction.InvokeCoreWithErrorHandling(Boolean async, LogicalControl logicalControl, Object state, UISession uiSession)
at Microsoft.Dynamics.Framework.UI.LogicalAction.DoInvoke(LogicalControl logicalControl, UISession uiSession)
at Microsoft.Dynamics.Framework.UI.LogicalFormActivator.<>c__DisplayClass2.<ValidateAndInvokePropertyBag>b__0()
Source: Microsoft.Dynamics.Nav.Client.UI
HResult: -2147467261

Application: Microsoft.Dynamics.Nav.Client.exe
Framework Version: v4.0.30319
Description: The application requested process termination through System.Environment.FailFast(string message).
Message: Object reference not set to an instance of an object.
Stack:
at System.Environment.FailFast(System.String)
at Microsoft.Dynamics.Nav.Client.WinClient.StartWinFormsClient.HandleGeneralException(System.Exception)
at Microsoft.Dynamics.Nav.Client.WinClient.ExceptionHandler.DoRethrowWithCatchException(System.Exception, Boolean)
at Microsoft.Dynamics.Nav.Client.WinClient.ExceptionHandler.WinFormsDispatcherUnhandledException(System.Object, Microsoft.Dynamics.Framework.UI.DispatcherUnhandledExceptionEventArgs)
at Microsoft.Dynamics.Framework.UI.WinForms.WinFormsDispatcher.HandleDispatcherException(System.Object, System.Exception)
at Microsoft.Dynamics.Framework.UI.WinForms.ExceptionWrapper.CatchException(System.Object, System.Exception)
at Microsoft.Dynamics.Framework.UI.WinForms.ExceptionWrapper.RunTryCatch(System.Object, System.Delegate, System.Object[])
at Microsoft.Dynamics.Framework.UI.WinForms.WinFormsDispatcher+<>c__DisplayClassa.<Invoke>b__9()
at System.RuntimeMethodHandle.InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(System.Object, System.Object[], System.Object[])
at System.Delegate.DynamicInvokeImpl(System.Object[])
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(System.Object)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
at System.Windows.Forms.Control.MarshaledInvoke(System.Windows.Forms.Control, System.Delegate, System.Object[], Boolean)
at System.Windows.Forms.Control.Invoke(System.Delegate, System.Object[])
at System.Windows.Forms.Control.Invoke(System.Delegate)
at Microsoft.Dynamics.Framework.UI.WinForms.WinFormsDispatcher.Invoke(System.Action)
at Microsoft.Dynamics.Framework.UI.LogicalFormActivator.DispatchToUISessionThread(Microsoft.Dynamics.Framework.UI.UISession, System.Action)
at Microsoft.Dynamics.Framework.UI.LogicalFormActivator.ValidateAndInvokePropertyBag(Microsoft.Dynamics.Framework.UI.FormPropertyBag, Microsoft.Dynamics.Framework.UI.UISession, System.Object)
at Microsoft.Dynamics.Nav.Client.NavUrlParser.ParseAndInvokeQuery(System.String, System.Object)
at Microsoft.Dynamics.Nav.Client.NavClientObject.NavigateToInternal()
at Microsoft.Dynamics.Nav.Client.NavClientObject.ExecuteNavigateTo()
at System.RuntimeMethodHandle.InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(System.Object, System.Object[], System.Object[])
at System.Delegate.DynamicInvokeImpl(System.Object[])
at Microsoft.Dynamics.Framework.UI.WinForms.ExceptionWrapper.RunTryCatch(System.Object, System.Delegate, System.Object[])
at Microsoft.Dynamics.Framework.UI.WinForms.WinFormsDispatcherOperation.InvokeInternal(System.Delegate, System.Object[])
at Microsoft.Dynamics.Framework.UI.WinForms.WinFormsDispatcherOperation+<>c__DisplayClass2.<BeginInvoke>b__0()
at System.RuntimeMethodHandle.InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(System.Object, System.Object[], System.Object[])
at System.Delegate.DynamicInvokeImpl(System.Object[])
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef)
at System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32)
at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)
at System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)
at Microsoft.Dynamics.Nav.Client.WinClient.NavWinFormsClientSession.RunMessagePump()
at Microsoft.Dynamics.Nav.Client.WinClient.NavWinFormsClientSession.RunCore()
at Microsoft.Dynamics.Framework.UI.Windows.ClientSessionBase.Run()
at Microsoft.Dynamics.Nav.Client.WinClient.NavClientErrorHandler.ExecuteAndCatchExceptions(System.Func`1<Int32>)
at Microsoft.Dynamics.Nav.Client.WinClient.ExceptionHandler.DoExecute(System.Func`1<Int32>)
at Microsoft.Dynamics.Nav.Client.WinClient.StartWinFormsClient.RunCore()
at Microsoft.Dynamics.Nav.Client.WinClient.StartWinFormsClient.Run(Boolean)
at Microsoft.Dynamics.Nav.Client.WinClient.StartWinFormsClient.RunAndDispose()
at Microsoft.Dynamics.Nav.Client.Program.ExecuteNormally(System.Func`1<Int32>)
at Microsoft.Dynamics.Nav.Client.Program.Main(System.String[])

*This post is locked for comments

  • Marcellus Profile Picture
    2,735 on at
    RE: Sales Order Page Causes RTC Crashing After Modification

    Good news!

  • Verified answer
    JacobM Profile Picture
    on at
    RE: Sales Order Page Causes RTC Crashing After Modification

    Ok this is now solved.

    Turns out the object was cached in SQL itself.

    Cheers!

  • Marcellus Profile Picture
    2,735 on at
    RE: Sales Order Page Causes RTC Crashing After Modification

    If you try to run Table 37 from the object designer is it also crashing the client?

  • JacobM Profile Picture
    on at
    RE: Sales Order Page Causes RTC Crashing After Modification

    Sure, I get a nice looking error.

    There is a problem showing the page preview.

    Detailed Information:

    Object reference not set to an instance of an object.

    Thanks Marcell

  • Marcellus Profile Picture
    2,735 on at
    RE: Sales Order Page Causes RTC Crashing After Modification

    Hi Jacob,

    Could you try to design Page 46 Sales Order Subform and click Preview?

  • JacobM Profile Picture
    on at
    RE: Sales Order Page Causes RTC Crashing After Modification

    7.0.34902.0

  • Marcellus Profile Picture
    2,735 on at
    RE: Sales Order Page Causes RTC Crashing After Modification

    What is your build number?

  • JacobM Profile Picture
    on at
    RE: Sales Order Page Causes RTC Crashing After Modification

    Hi Marcell,

    The field in question is called color(text 250). It is a plain text field with no additional code. It already existed on the Sales Line Table. The error occurred after it was added to the Sales Order Subform Page to display the product color on the sales line.

    First I simply removed it & recompiled.

    Then I tried restoring from a backup .fob & recompiled.

    Thanks

  • Suggested answer
    Marcellus Profile Picture
    2,735 on at
    RE: Sales Order Page Causes RTC Crashing After Modification

    Hi Jacob,

    How did you revert your changes? Did you reimport an earlier or standard objects?

    Does this field exist in the sales header or sales line table? If yes, did you remove them from the table or only from the page?

    What was your field doing and is there any code involved?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics NAV (Archived)

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans