Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

Error: Part Reference's menu item must point to a Form.

Posted on by 12
Hello everyone, 

I am trying to go to the lines of fixed assets journal and started receiving this error, even though this form doesn't have any form parts.
Any advice, please?//
  • Error: Part Reference's menu item must point to a Form.
    Hi, we encountered this issue as well and I wanted to share some more information. 
    It happens for us on version 10.0.38 in a sandbox environment. We have multiple sandbox environments, but this issue is only happening in one of them for now. 
    There is a stack trace in the logs which suggests the issue is coming from an attempt to initialize the preview forms that pop up when you hover your mouse over the 2 Financial Tags fields. 
     
    Method registerFinTagPreview in class FinTagReferenceGroupController, the first line that calls referenceGroupControl.previewPartRef(menuItemDisplayStr(FinTagPreviewPart))
    private void registerFinTagPreview()
    {
        referenceGroupControl.previewPartRef(menuItemDisplayStr(FinTagPreviewPart));
        FormStringControl stringControl = this.getReferenceGroupStringControl();
    
        if (stringControl && this.companyReferenceField)
        {
            stringControl.userDataItem(this.companyReferenceField);
        }
    }
    Here is the full stack trace
     at [aoskernel.dll]Microsoft.Dynamics.Ax.MSIL.Interop.GetManagedCallStack(basic_string\,std::allocator >* , Boolean truncateStackTrace)
     at [aoskernel.dll]Microsoft.Dynamics.Ax.Services.AOSAppDomainHelper.callGetManagedCallStack(basic_string\,std::allocator >* )
     at callGetManagedCallStack(basic_string\,std::allocator >* )
     at cqlClass.callEx(cqlClass* , Char* , interpret* )
     at cqlClass.callEx(cqlClass* , Char* , interpret* )
     at [aoskernel.dll]Microsoft.Dynamics.Ax.MSIL.cqlClassIL.Call(IntPtr c, String methodName, Object[] parameters, Type[] types, Object[] varargs, Type[] varargsTypes)
     at [Microsoft.Dynamics.AX.Server.Core.dll]Microsoft.Dynamics.Ax.Xpp.XppObjectBase.Call(String methodName, Object[] parameters, Type[] types, Object[] varargs) in D:\dbs\sh\l23t\0330_211111\cmd\r\Source\Kernel\serveril\Server.Core\Server.Core\XppObjectBase.cs:line 257
     at [Microsoft.Dynamics.Ax.Xpp.Support.dll]Dynamics.AX.Application.xInfo.add(Exception exception1, String text1, String text2) in D:\dbs\sh\l23t\0330_211111\cmd\i\Source\Kernel\xppil\XppSupport\XppKernelClasses\xInfo.cs:line 138
     at [Dynamics.AX.ApplicationPlatform.dll]Dynamics.AX.Application.Info.`add(Exception _exception, String _txt, String _helpUrl, XppObjectBase _sysInfoAction, Boolean buildprefix, String _label, Boolean @_helpUrl_IsDefaultSet, Boolean @_sysInfoAction_IsDefaultSet, Boolean @buildprefix_IsDefaultSet, Boolean @_label_IsDefaultSet)
     at [Dynamics.AX.ApplicationPlatform.dll]Dynamics.AX.Application.Info.add(Exception _exception, String _txt, String _helpUrl, XppObjectBase _sysInfoAction, Boolean buildprefix, String _label, Boolean @_helpUrl_IsDefaultSet, Boolean @_sysInfoAction_IsDefaultSet, Boolean @buildprefix_IsDefaultSet, Boolean @_label_IsDefaultSet)
     at [Dynamics.AX.ApplicationPlatform.dll]Dynamics.AX.Application.Info.add(Exception _exception, String _txt, String _helpUrl, XppObjectBase _sysInfoAction, Boolean buildprefix, String _label)
     at [Dynamics.AX.ApplicationPlatform.dll]Dynamics.AX.Application.Info.`kernelAdd(Exception _exception, String _txt, String label)
     at [Dynamics.AX.ApplicationPlatform.dll]Dynamics.AX.Application.Info.kernelAdd(Exception _exception, String _txt, String label)
     at Info::kernelAdd(Object , Object[] , Boolean& )
     at [Microsoft.Dynamics.Ax.Xpp.Support.dll]Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeInstanceCall(Object instance, String MethodName, Object[] parameters) in D:\dbs\sh\l23t\0330_211111\cmd\i\Source\Kernel\xppil\XppSupport\ReflectionCallHelper.cs:line 2001
     at callILClassMethod(interpret* ip, Char* method, UInt32 chdl, cqlClass* c)
     at cqlClass.callEx(cqlClass* , Char* , interpret* )
     at cqlClass.callEx(cqlClass* , Char* , interpret* )
     at [aoskernel.dll]Microsoft.Dynamics.Ax.MSIL.cqlClassIL.Call(IntPtr c, String methodName, Object[] parameters, Type[] types, Object[] varargs, Type[] varargsTypes)
     at [Microsoft.Dynamics.AX.Server.Core.dll]Microsoft.Dynamics.Ax.Xpp.XppObjectBase.Call(String methodName, Object[] parameters, Type[] types, Object[] varargs) in D:\dbs\sh\l23t\0330_211111\cmd\r\Source\Kernel\serveril\Server.Core\Server.Core\XppObjectBase.cs:line 257
     at [Microsoft.Dynamics.AX.FormsEngine.dll]Dynamics.AX.Application.FormReferenceGroupControl.previewPartRef(String _value) in D:\dbs\sh\l23t\0330_211111\cmd\i\Source\Kernel\FormsEngine\FormsEngine\Xpp\FormReferenceGroupControl.cs:line 3519
     at [Dynamics.AX.FinTag.dll]Dynamics.AX.Application.FinTagReferenceGroupController.registerFinTagPreview()
     at [Dynamics.AX.FinTag.dll]Dynamics.AX.Application.FinTagReferenceGroupController.`initialize()
     at [Dynamics.AX.FinTag.dll]Dynamics.AX.Application.FinTagReferenceGroupController.initialize()
     at [Dynamics.AX.FinTag.dll]Dynamics.AX.Application.FinTagReferenceGroupController.registerReferenceGroup(FinTagReferenceGroupControllerContract _contract)
     at [Dynamics.AX.ApplicationSuite.dll]Dynamics.AX.Application.Forms.LedgerJournalTransDaily.initFinancialTags()
     at [Dynamics.AX.ApplicationSuite.dll]Dynamics.AX.Application.Forms.LedgerJournalTransDaily.`init()
     at [Dynamics.AX.ApplicationSuite.dll]Dynamics.AX.Application.Forms.LedgerJournalTransDaily.LedgerJournalTransDailyCoCHelper.`init(LedgerJournalTransDaily instance)
     at [Dynamics.AX.SubscriptionBilling.dll]Dynamics.AX.Application.LedgerJournalTransDailyFormSubBillDeferral_Extension.init(LedgerJournalTransDaily this)
     at [Dynamics.AX.ApplicationSuite.dll]Dynamics.AX.Application.Forms.LedgerJournalTransDaily.LedgerJournalTransDailyCoCHelper.`init(LedgerJournalTransDaily instance)
     at [Dynamics.AX.ApplicationSuite.dll]Dynamics.AX.Application.Forms.LedgerJournalTransDaily.init()
     at [Microsoft.Dynamics.AX.FormsEngine.dll]Dynamics.AX.Application.xFormRun.__initWrapper() in D:\dbs\sh\l23t\0330_211111\cmd\i\Source\Kernel\FormsEngine\FormsEngine\Xpp\xFormRun.cs:line 3603
     at LedgerJournalTransDaily::__initWrapper(Object , Object[] , Boolean& )
     at [Microsoft.Dynamics.Ax.Xpp.Support.dll]Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeInstanceCall(Object instance, String MethodName, Object[] parameters) in D:\dbs\sh\l23t\0330_211111\cmd\i\Source\Kernel\xppil\XppSupport\ReflectionCallHelper.cs:line 2001
     at callILClassMethod(interpret* ip, Char* method, UInt32 chdl, cqlClass* c)
     at cqlClass.callEx(cqlClass* , Char* , interpret* )
     at cqlClass.callEx(cqlClass* , Char* , interpret* )
     at [aoskernel.dll]Microsoft.Dynamics.Ax.MSIL.cqlClassIL.Call(IntPtr c, String methodName, Object[] parameters, Type[] types, Object[] varargs, Type[] varargsTypes)
     at [Microsoft.Dynamics.AX.Server.Core.dll]Microsoft.Dynamics.Ax.Xpp.XppObjectBase.Call(String methodName, Object[] parameters, Type[] types, Object[] varargs) in D:\dbs\sh\l23t\0330_211111\cmd\r\Source\Kernel\serveril\Server.Core\Server.Core\XppObjectBase.cs:line 257
     at [Microsoft.Dynamics.AX.FormsEngine.dll]Dynamics.AX.Application.FormFunctionButtonControl.clicked() in D:\dbs\sh\l23t\0330_211111\cmd\i\Source\Kernel\FormsEngine\FormsEngine\Xpp\FormFunctionButtonControl.cs:line 618
     at [Dynamics.AX.ApplicationSuite.dll]Dynamics.AX.Application.Forms.LedgerJournalTable.FormControl.JournalLines.clicked()
     at JournalLines::Clicked(Object , Object[] , Boolean& )
     at [Microsoft.Dynamics.Ax.Xpp.Support.dll]Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeInstanceCall(Object instance, String MethodName, Object[] parameters) in D:\dbs\sh\l23t\0330_211111\cmd\i\Source\Kernel\xppil\XppSupport\ReflectionCallHelper.cs:line 2001
     at [Microsoft.Dynamics.AX.FormsEngine.dll]Microsoft.Dynamics.Ax.Xpp.FormNestedElementsCoCSubscriptionsManager.MakeInstanceCall(Object instance, String methodName, String nestedElementName, String rootName, Object[] parameters) in D:\dbs\sh\l23t\0330_211111\cmd\i\Source\Kernel\FormsEngine\FormsEngine\Xpp\ChainOfCommand\FormNestedElementsCoCSubscriptionsManager.cs:line 187
     at [Microsoft.Dynamics.Ax.Xpp.Support.dll]Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.KernelToXppInstanceCallCoC(Object instance, String methodName, String nestedElementName, String rootName, Object[] parameters) in D:\dbs\sh\l23t\0330_211111\cmd\i\Source\Kernel\xppil\XppSupport\ReflectionCallHelper.cs:line 3018
     at [aoskernel.dll]Microsoft.Dynamics.Ax.MSIL.cqlClassIL.InvokeInstanceCallHandlerCoC(Object instance, String MethodName, String NestedElementName, String RootName, Object[] parameters)
     at callILClassMethodCoC(interpret* ip, Char* method, Char* nestedConceptName, Char* rootName, UInt32 chdl, cqlClass* c)
     at [aoskernel.dll]Microsoft.Dynamics.Client.ServerForm.Interactions.InteractionHandler.InvokeCommand(CommandInteraction interaction, CommandCallbackInteraction& result)
     at [aoskernel.dll]Microsoft.Dynamics.Client.ServerForm.Interactions.InteractionHandler.HandleCommandInteraction(CommandInteraction interaction, List`1 outboundInteractions)
     at [aoskernel.dll]Microsoft.Dynamics.Client.ServerForm.Interactions.DelegateWrapper`1.Invoke(Interaction interaction, List`1 outboundInteractions)
     at [aoskernel.dll]Microsoft.Dynamics.Client.ServerForm.Interactions.InteractionHandler.HandleInteractions(IInteractionChannel interactionChannel)
     at [aoskernel.dll]Microsoft.Dynamics.Client.ServerForm.Interactions.InteractionManager.ProcessMessages(Object stateinfo)
     at [Microsoft.Dynamics.Client.InteractionService.dll]Microsoft.Dynamics.Client.InteractionService.Communication.Reliable.ReliableCommunicationManagerWebAPI.ProcessMessagesWithInstrumenation(Object state)
     at [mscorlib.dll]System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
     at [mscorlib.dll]System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
     at [mscorlib.dll]System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
     at [mscorlib.dll]System.Threading.ThreadPoolWorkQueue.Dispatch()	
     
  • Community member Profile Picture
    Community member 12 on at
    Error: Part Reference's menu item must point to a Form.
    Dear Waed, 

    I tried all the mentioned, still not working. This error is appearing when trying to open the lines of any type of general ledger journals.

    Dear Layan, when trying to debug, I get a strange behavior, the lines open normally, but when the debugger is off, the lines form won't open showing the mentioned error, can you advise?
     
    Best regards!
  • Suggested answer
    Waed Ayyad Profile Picture
    Waed Ayyad 5,955 Super User 2024 Season 2 on at
    Error: Part Reference's menu item must point to a Form.
     
    Did you try the below? 
     
    1- Try to restart IIS.
    2- Try to restart you Dev Box. And As Ander mentioned try to debug the code, just open the form code and on the init method , put a break point and start the debugging.
    3- If you click on the Journal number on any line does the same error appear?
     
     
    Thanks
    Waed Ayyad
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future
  • Layan Jwei Profile Picture
    Layan Jwei 7,204 Super User 2024 Season 2 on at
    Error: Part Reference's menu item must point to a Form.
    Hi Community member,
     
    Are you sure you removed all customizations? Is there any customization for the "lines" menu item? Or the form assigned to the menu item?
    Also are you sure you did full build and not just building the project or your model?
     
    Yes please debug and see at what line the code fails, if there is a main method, put the break point there, if there is an init method also put the code there.
     
    Thanks,
    Layan Jweihan
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future
  • Suggested answer
    Waed Ayyad Profile Picture
    Waed Ayyad 5,955 Super User 2024 Season 2 on at
    Error: Part Reference's menu item must point to a Form.
     
    1- Try to restart IIS.
    2- Try to restart you Dev Box. And As Ander mentioned try to debug the code, just open the form code and on the init method , put a break point and start the debugging.
    3- If you click on the Journal number on any line does the same error appear?
     
     
    Thanks
    Waed Ayyad
  • Community member Profile Picture
    Community member 12 on at
    Error: Part Reference's menu item must point to a Form.
    Hi Andre, I am sorry I am a new dev, I am not sure where exactly should I put a breakpoint to use the debugger, can you please advise?
  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 290,900 Super User 2024 Season 2 on at
    Error: Part Reference's menu item must point to a Form.
    Have you tried using the debugger to find out where and when it is raising the error? You can then learn what could be the culprit.
  • Community member Profile Picture
    Community member 12 on at
    Error: Part Reference's menu item must point to a Form.
    Hi Waed,
     
    Thanks for the reply, but I tried to full build, full db sync and clearing all caches, still never works though.
  • Suggested answer
    Waed Ayyad Profile Picture
    Waed Ayyad 5,955 Super User 2024 Season 2 on at
    Error: Part Reference's menu item must point to a Form.
     
    Since you delete your extensions of the form, then try to do full be for the model that you tried to do extension on it and try to clear cache.
     
    Path: setting -> user options -> Usage data -> All usage data 
     
    Thanks, 
    Waed Ayyad
     
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future
     
  • Community member Profile Picture
    Community member 12 on at
    Error: Part Reference's menu item must point to a Form.
    I did do some customization in an extension class to customize some behaviour in the init method, but I even deleted that form extension class and made a full build, it is still appearing. It is really weird because I don't even have a menu item extension to this form, and it doesn't contain any form parts.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,900 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,275 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans