При открытии раздела ошибка "undefined is not an object (evaluating 'ruleConfig.rule')"
11 июня 2018 02:17
Симптомы
Баг-репорт:
Type: Terrasoft.SourceCodeException
Message: TypeError: undefined is not an object (evaluating 'ruleConfig.rule')
Причина
BusinesRuleManager в карточке редактирования выполняет правила паралельно
Решение
1.В конфигурации добавить кастомную схему с типом «Исходный код», например, с названием «UsrMobileUtilities»;
2.В схеме вставить код:
Ext.define("Terrasoft.BusinessRulesManager.Override", {
override: "Terrasoft.BusinessRulesManager",
/**
* @private
*/
doExecuteRules: function(config) {
this.executionConfig = config;
this.allRulesAreValid = true;
this.executeRulesForNextRecord();
},
executeRules: function(config) {
if (this.rulesToExecute > this.rulesExecuted) {
this.waitRulesInProgressId = setInterval(function() {
if (this.rulesToExecute === this.rulesExecuted) {
clearInterval(this.waitRulesInProgressId);
this.doExecuteRules(config);
}
}.bind(this), 500);
} else {
this.doExecuteRules(config);
}
}
});3. Сохраняете изменения;
4. Данную схему подключить в манифесте мобильного приложения (например, «MobileApplicationManifestDefaultWorkplace») в секции «CustomSchemas»:
"CustomSchemas": [
"UsrMobileUtilities"
]![]()
5. Сохранить изменения.
Второй способ решения: заполнить справочники Города, Регионы и Страны (с заполнением связывающих полей).
Показать все комментарии
Войдите или зарегистрируйтесь, что бы комментировать