Hi, I'm trying to programatically click on an item in the menue to switch page.

This one call did the trick.

Send ClientAction of hoChildren[iElement] "itemClick"



Though I get this error at the moment, which is a bit hard to figure out.


df\WebMenuItem.js:70 Uncaught TypeError: Cannot read properties of undefined (reading 'call')
at WebMenuItem.<anonymous> (df\WebMenuItem.js:70)
at WebMenuItem.fireEx (df\WebObject.js:661)
at WebMenuItem.fire (df\WebObject.js:561)
at WebMenuItem.itemClick (df\WebMenuItem.js:62)
at WebApp.execClientAction (df\WebApp.js:1514)
at WebApp.handleHeader (df\WebApp.js:1428)
at WebApp.handleCall (df\WebApp.js:1262)
at WebApp.<anonymous> (df\WebApp.js:1305)
at JSHandler.fire (df\events.js:1304)
at JSONCall.onReadyStateChange (df\ajax\HttpRequest.js:179)





Here is the javascript that seems to be causing this issue. The problem is that oEnv us undefined
-------------------------------------------------------------------
/*
Called by a menu engine when this menu item is clicked. It triggers the OnClick event and if needed
performs a load view (psLoadViewOnClick).
*/
itemClick : function(tItem, fReturn, oEnv){

return this.fire('OnClick', [], function(oEvent){
// Determine if a view needs to be loaded
if(!oEvent.bCanceled){
if(this.psLoadViewOnClick){
this.getWebApp().showView(this.psLoadViewOnClick);
}
}

fReturn.call(oEnv, (oEvent.bClient || oEvent.bServer || this.psLoadViewOnClick)); <--- Here it complains that oEnv us undefined
});
},







Is there something in my cliant action call that is missing or something else I need to do to get this to work?