Skip to main content
1-Visitor
July 14, 2015
Question

Network class methods

  • July 14, 2015
  • 1 reply
  • 1237 views

Hello I am trying to utilize methods of the "Network" class...  Am having some challenges

I have a network called "CustomerNetwork"  I am trying to  manipulate it through code

one example  removing an entity from the Network

my code for this is

Networks['CustomerNetwork'].RemoveFromNetwork('Store5');

when I test this code I get the following error

Wrapped java.lang.Exception: Invalid parameter type for service: [RemoveFromNetwork] on CustomerNetwork Cause: Invalid parameter type for service: [RemoveFromNetwork] on CustomerNetwork..

According to the class reference the parameter type should be string..  I have entered a string in quotes , In previous tries I have passed a string as a parameter and get the same error...  I have tried several other methods where I needed to pass a parameter and get similar results

    1 reply

    1-Visitor
    July 15, 2015

    I recommend you use the snippet.

    var params = {

      name: undefined /* STRING */

    };

    // no return

    Networks["AcmeVending"].RemoveFromNetwork(params);

    As you can see it is using not a String in the Service but a JSON Object.

    michaele1-VisitorAuthor
    1-Visitor
    July 15, 2015

    Many thanks!!