| This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal. |
| This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal. |
Hi @Hvnv Twvvews ,
Try either of the below,
function invokeFunction() {
var client = kony.sdk.getCurrentInstance();
var intgService;
var extraArgument = "extraArgument";
intgService = client.getIntegrationService("<servicename>");
intgService.invokeOperation("<operationname>", {}, {}, function(response) {
operationSuccess(extraArgument,response);
}, operationfailure);
}
(OR)
function invokeFunction() {
var client = kony.sdk.getCurrentInstance();
var intgService;
var extraArgument = "extraArgument";
intgService = client.getIntegrationService("<servicename>");
intgService.invokeOperation("<operationname>", {}, {}, operationSuccess.bind(this,extraArgument), operationfailure);
}
function operationSuccess(extraArgument,reponse) {
kony.print("Extra argument"+extraArgument);
kony.print("Response"+response);
}
function operationfailure(error) {
kony.print("Error"+error);
}
The first method didn't work (Response is unidentified), second - Worked! Thank you!