Normally in business object a connector can be called like this:
result = Simplifier.Connector.xyz.connectorMethod([{‘param1’: input.input1, param2: input.input2}]);
But how can I achieve it to call the connector dynamically.
Adopted that I get the connector name dynamically in business object: var connector = “xyz”;
I tried with eval() but this does not work and results in <TypeError: null has no such function \”connectorMethod\”>
connectorExecString = ‘Simplifier.Connector.’ + connector + ‘.connectorMethod([{\’param1\’: ‘ + input.input1 + ‘, \’param2\’: ‘ + input.input2 + ‘}])’; result = eval(connectorExecString);
by the way: connectorExecString is build correctly in my opinion:
Simplifier.Connector.xyz.connectorMethod([{‘param1’: input.input1, ‘param2’: input.input2}]);
Hello Klaus,
Simplifier.Connector is a javascript object so you can use the standard javascript object notation to achieve it.
For example:
var myConnectorName = ‘Test_Con’
Simplifier.Connector[myConnectorName].testCall()
You must be logged in to reply to this topic.
Enter the destination URL
Or link to existing content