Всем добрый день! Столкнулся с проблемой, в замещенной схеме CtiPanel не работает UpdateQuery.
define("CtiPanel", [],
function() {
return {
entitySchemaName: "Call",
messages: {
"WaSendCallDataToContact":{
mode: Terrasoft.MessageMode.PTP,
direction: Terrasoft.MessageDirectionType.PUBLISH
},
"WaSetDataToCall": {
mode: Terrasoft.MessageMode.PTP,
direction: Terrasoft.MessageDirectionType.SUBSCRIBE
}
},
mixins: {},
attributes: {
WaRelationEntities: { dataValueType: Terrasoft.DataValueType.CUSTOM_OBJECT }
},
methods: {
init: function() {
this.callParent(arguments);
this.processMessage();
},
onCallSavedEvent: function(call) {
this.callParent(arguments);
var relations = this.get("WaRelationEntities");
if(relations && relations.length > 0) {
var callId = call.databaseUId;
this.getUpdateQueryCall(callId, relations);
this.set("WaRelationEntities", null);
}
this.sandbox.publish("WaSendCallDataToContact", call, ["_WaSendCallDataToContact"]);
},
processMessage: function(){
this.sandbox.subscribe("WaSetDataToCall", this.onMessageSubscribe.bind(this), this);
},
onMessageSubscribe: function(args) {
this.set("WaRelationEntities", args);
window.console.log("onMessageSubscribe(args): ", args);
},
getUpdateQueryCall: function (id, relations){
debugger;
var updateQuery = Ext.create("Terrasoft.UpdateQuery", {
rootSchemaName: this.entitySchemaName
});
var filters = updateQuery.filters;
filters.addItem(this.Terrasoft.createColumnFilterWithParameter(this.Terrasoft.ComparisonType.EQUAL, "Id", id));
for(var i = 0; i < relations.length; i++) {
updateQuery.setParameterValue(relations[i].entitySchemaName, relations[i].value, relations[i].type);
}
updateQuery.exequte(this.updateQueryCallBack, this);
},
updateQueryCallBack: function(result) {
if(!result.success) {
window.console.error(result);
return;
}
}
},
diff: []
};
}
);
ошибки следующие - http://prntscr.com/nh5uws
В чем может быть проблема?