Cannot pass a parameter value to the destination class in EP

Hi,
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. 
Example:
I initialize the parameters for testing; 

webLinkAddItem = new WebLink();
webLinkAddItem.addOrUpdateExtraParam('test', 'testing');
webLinkAddItem.parm("something");
webLinkAddItem.menufunction(new 
WebActionMenuFunction(webactionitemstr(EPAddLine)));

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: 

["__EVENTARGUMENT"->"EPAddLine?WP=something¤&test=testing&WTID=175&WREC=5639142111&WKEY=[65534:5639142111]....

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

Hello,

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 (http://msdn.microsoft.com/en-us/library/aa629010.aspx) and debug your code.

Hope this helps,

Hi,

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

aa.parm(mf.parameters());

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

myWebLink.parm(“testing”);

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.