Forum Discussion

Suhas's avatar
Suhas
Ideator I
6 years ago
Solved

Calling server method from another server method

Hello All, From one server method (Method A ), I'm calling another server method (Method B) . From (Method B) returning inn.newError("Error");  And in calling method (Method A) checking resu...
  • cogres's avatar
    cogres
    6 years ago

    Hi Suhas,

    see my reply below. You can pass any information from Method A to Method B by setting properties on the item you apply the method on:

    // we have an Innovator object called inn
    var methodItem = inn.newItem("Method");
    methodItem.setProperty("some_info_for_method_b", "value for that info");
    var resultItem = methodItem.apply("Method B");

    You can then access some_info_for_method_b in Method B with

    string info = this.getProperty("some_info_for_method_b", "")

    Of course, you can set as many of those auxiliary properties as you like, or pass all method arguments in one property, separated by commas.

    Hope this helps,

    C