Hi All,
In case section,I am calling a process on save inside a popup.
The process is not triggering handleServerChannelMessage on success of it.
The code is below.
save: function() {this.openInputBox();
this.callParent(arguments);},
openInputBox: function(obj) {
var GetAnswerButton = this.Ext.create("Terrasoft.Button", {
returnCode: "GetAnswer",
className: "Terrasoft.Button",
caption: "Get Answer",
style: this.Terrasoft.controls.ButtonEnums.style.GREEN
});
var SkipButton = this.Ext.create("Terrasoft.Button", {
returnCode: "Skip",
className: "Terrasoft.Button",
caption: "Skip",
style: this.Terrasoft.controls.ButtonEnums.style.Blue,
enabled: !obj.SBLCanSkip,
});
var NextButton = this.Ext.create("Terrasoft.Button", {
returnCode: "Next",
className: "Terrasoft.Button",
caption: "Next",
style: this.Terrasoft.controls.ButtonEnums.style.Blue
});
var controls = {
"UsrReference": {
dataValueType: Terrasoft.DataValueType.TEXT,
isRequired: obj.SBLCanSkip,
caption: this.get("UsrQuestion"),
value: {
layout: {
"colSpan": 24,
"rowSpan": 1,
"column": 0,
"row": 1
},
bindTo: "UsrReference",
},
customConfig: {
enabled: false
}
},
};
Terrasoft.utils.inputBox("Call Center Question",
this.openInputBoxHandler,
[GetAnswerButton, SkipButton, NextButton],
this,
controls
);
Terrasoft.each(Terrasoft.MessageBox.controlArray, function(item) {
item.control.bind(this);
}, this);
},
openInputBoxHandler: function(returnCode, controlData) {
if ("GetAnswer" === returnCode) {
var args = {
sysProcessName: "SBLTestMessage",
};
ProcessModuleUtilities.executeProcess(args);
Terrasoft.ServerChannel.on(Terrasoft.EventName.ON_MESSAGE, this.handleServerChannelMessage, this);
}
},
handleServerChannelMessage: function(channel, message) {
var messageSenderName = message && Terrasoft.ServerChannel.getSenderName(message);
if (messageSenderName === "Answer") {
var data=message.Body;
}
},