I get below Error when adding customized Menu item in Work task form
Ifs.Fnd.FndSystemException: Explorer: An Unhandled Exception has occurred ---> System.ArgumentOutOfRangeException: startIndex cannot be larger than length of string.
Parameter name: startIndex
at System.String.Substring(Int32 startIndex, Int32 length)
at System.String.Substring(Int32 startIndex)
at Ifs.Fnd.ApplicationForms.Custom.CustomMenus.GetMenuConfiguration(SalWindowHandle hWnd)
at Ifs.Fnd.ApplicationForms.Custom.CustomMenus.MenuDefaultItemsAdd(ContextMenu contextMenu, Control owner)
at Ifs.Fnd.CustomObjectsServiceProvider.CustomObjectsService.MenuDefaultItemsAdd(ContextMenu contextMenu, Control owner)
at Ifs.Fnd.CustomObjectsServiceProvider.CustomObjectsService.Ifs.Fnd.ApplicationForms.Custom.Interfaces.IAPFCustomObjectsService.MenuDefaultItemsAdd(ContextMenu contextMenu, Control owner)
at Ifs.Fnd.ApplicationForms.FndContextMenu.MenuDefaultFormMenuItemsAdd(ContextMenu contextMenu, Control owner)
at Ifs.Fnd.ApplicationForms.FndContextMenu.MenuDefaultItemsAdd(ContextMenu contextMenu, Control owner, Type menuType)
at Ifs.Fnd.ApplicationForms.FndContextMenu.SalMenuToFndMenu(ContextMenu contextMenu, Control owner, Type menuType, Boolean isTouch)
at Ifs.Fnd.ApplicationForms.FndContextMenu.SalMenuToFndMenu(ContextMenu contextMenu, Control owner, Type menuType)
at Ifs.Fnd.ApplicationForms.cFormWindow.ConvertMenuToContextMenuStrip(ContextMenu contextMenu, Control owner, Type menuType)
at PPJ.Runtime.Windows.SalForm.ConvertMenuToContextMenuStripInternal(ContextMenu contextMenu, Control owner, Type menuType)
at PPJ.Runtime.Windows.SalWindow.TrackPopupMenu(Control ctrl, Type menuType, Int32 flags, Point pos)
at PPJ.Runtime.Windows.SalWindow.TrackPopupMenu(Control ctrl, String menuName, Int32 flags, Point pos)
at PPJ.Runtime.Sal.TrackPopupMenu(Control owner, SalString menuName, SalNumber flags, SalNumber x, SalNumber y)
at Ifs.Fnd.ApplicationForms.cWindowTranslation.TrackPopupMenu(SalWindowHandle hWnd, SalString sMenuName, SalNumber nFlags, SalNumber nX, SalNumber nY)
at Ifs.Fnd.ApplicationForms.cWindowTranslation.OnPmContextMenu(SalNumber nUseMousePos, SalString sMenuName)
at Ifs.Fnd.ApplicationForms.cWindowTranslation.cWindowTranslation_WindowActions(Object sender, WindowActionsEventArgs e)
at PPJ.Runtime.Windows.SalWindow.InvokeWindowActions(WindowActionsEventArgs args, SalContext context, Int32 startIndex)
at PPJ.Runtime.Windows.SalWindow.FireWindowActions(Int32 msgCode, IntPtr wParam, IntPtr lParam)
at PPJ.Runtime.Windows.SalWindow.DispatchThenProcess(Message& m)
at PPJ.Runtime.Windows.SalWindow.ProcessWndProc(Message& m)
at PPJ.Runtime.Windows.SalForm.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
--- End of inner exception stack trace ---
What I have done:
Customized ‘frmJtTaskTab’, and added just a simple menu item
Once it is compiled and run.
In IEE, Work Task form
just Right click and it gives the above error.
Tried with few codes from different UPD versions and same error exists.
Did anyone experienced the same issue before? Any workaround?