Cannot pass a parameter value to the destination class in EP

I'm using WebLink()-class and webaction-menu item to execute the destination 
class. However I can't get the param value out of the args in the destination 
side. I'm sure it's there but I just can't get it out. 
I initialize the parameters for testing; 

webLinkAddItem = new WebLink();
webLinkAddItem.addOrUpdateExtraParam('test', 'testing');

Then in the destination class Main()-method:
str searchval = webSession().getParm('WP');
str val2 = webSession().getParm('test');

These both won't return anything. I'm sure it's there because the string in 
websession shows them: 


I can get out WTID and WREC values though, I wonder why? 
Please, could someone answer this.


In the destination class, are you using args class to receive arguments?

Some additional things to check -

  1. Check whether you have correct security access in your code. For inspiration have a look at WebPortalExecutionEngine class → processWebMenuFunction

  2. If you haven’t already done so, try enabling it ( and debug your code.

Hope this helps,


I certanly have debugged it. In ProcessWebMenuFunction(), args get initialized:


My guess is, it fails to add a parameter to weblink:


This is one of the weirdiest things I have bumped with AX.

Hi again,

I have tried to use a global variable which I added to websession-class, so that I wouldn’t have to pass parameters with weblink. But it didn’t work either - in destination class, the websession’s value was different than in caller class. This is really mindblowing.