Question

Error when adding customized Menu item in Work task form in APP10 IEE

  • 8 May 2023
  • 4 replies
  • 93 views

Userlevel 4
Badge +8

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?
 


4 replies

Userlevel 5
Badge +13

Hi @AddRangaF ,

 

Can you let me know what you want to achieve?

What Type of Action of the Custom Menu do you want to create?

If know more abou that, I can help you out for a solution.

 

I have not seen this error related to Custom menus before.

 

Robert 

Userlevel 4
Badge +8

Hi Robert,
This is not a custom menu. Customized menu I am trying to add with a code change.
Just a simple menu with method inquire and execute.

Thanks & BR,
Rangani

Userlevel 5
Badge +13

HI @AddRangaF ,

Ok. Sorry, than I cannot help you.

Hope you get a good answer soon.

Robert

Userlevel 3
Badge +8

Have you checked the method inquire and execute with simple return true.

is the command added from command manager?  

Reply