This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - How to write parameterized method or How to pass parameter to method ?

revanishwar - Tuesday, May 26, 2009 4:08 AM:

I want to write a method/function that will contain some parameter.

How to use these parameter in the coding ?

And also how to call this parameterized method from any method or on any event.

 

Thank you....



tstickel - Wednesday, May 27, 2009 8:47 AM:

The code snippet below is the client code to call a server method and send 2 parameters:

var innovator  = this.newInnovator();
var res = innovator.applyMethod("mymethod","<parm1>123456</parm1><parm2>ABCDE</parm2>");
alert(res.getResult);

In the above code, you can use any xml node names you choose.  The server method will have code similar to:

Dim parm1 As String = Me.getProperty("parm1")

Dim parm2 As String = Me.getProperty("parm2")

Dim res As Item = myInnovator.newResult(parm1 + parm2)
Return res

See Programmer's Guide for example of calling a client method.