Возникла необходимость доработать раздел шаблонов email сообщений. Добавил замещающую схему для раздела и страницы. Если входить в раздел из справочников, то всё работает нормально, но если зайти в раздел напрямую из меню разделов, то страница падает с ошибкой
Uncaught TypeError: Cannot read property 'primaryDisplayColumn' of undefined
at constructor.<anonymous> (ProfileUtilities.js:90)
at constructor.nextStep (commonutils.js:103)
at commonutils.js:488
at Object.execCb (require.js:1693)
at Module.check (require.js:881)
at Module.enable (require.js:1173)
at Module.init (require.js:786)
at require.js:1457
(anonymous) @ ProfileUtilities.js:90
nextStep @ commonutils.js:103
(anonymous) @ commonutils.js:488
execCb @ require.js:1693
check @ require.js:881
enable @ require.js:1173
init @ require.js:786
(anonymous) @ require.js:1457
setTimeout (async)
req.nextTick @ require.js:1812
localRequire @ require.js:1446
requirejs @ require.js:1794
Terrasoft.utils.common.require @ commonutils.js:487
(anonymous) @ ProfileUtilities.js:86
nextStep @ commonutils.js:103
Terrasoft.utils.common.chain @ commonutils.js:106
getSectionDefaultGridSettings @ ProfileUtilities.js:84
initSectionProfile @ ProfileUtilities.js:101
(anonymous) @ ProfileUtilities.js:121
(anonymous) @ commonutils.js:488
execCb @ require.js:1693
check @ require.js:881
(anonymous) @ require.js:1136
(anonymous) @ require.js:134
(anonymous) @ require.js:1186
each @ require.js:59
emit @ require.js:1185
check @ require.js:936
enable @ require.js:1173
init @ require.js:786
(anonymous) @ require.js:1011
(anonymous) @ require.js:134
requestObject.onreadystatechange @ profile.js:39
XMLHttpRequest.send (async)
profileRequest @ profile.js:44
load @ profile.js:50
(anonymous) @ require.js:1092
(anonymous) @ require.js:134
on @ require.js:515
callPlugin @ require.js:953
fetch @ require.js:822
check @ require.js:854
enable @ require.js:1173
enable @ require.js:1554
(anonymous) @ require.js:1158
(anonymous) @ require.js:134
each @ require.js:59
enable @ require.js:1110
init @ require.js:786
(anonymous) @ require.js:1457
setTimeout (async)
req.nextTick @ require.js:1812
localRequire @ require.js:1446
requirejs @ require.js:1794
Terrasoft.utils.common.require @ commonutils.js:487
requireProfile @ ProfileUtilities.js:30
getProfile @ ProfileUtilities.js:113
initSchemaProfile @ SchemaBuilderV2.js:162
nextStep @ commonutils.js:103
(anonymous) @ SchemaBuilderV2.js:156
(anonymous) @ commonutils.js:488
execCb @ require.js:1693
check @ require.js:881
enable @ require.js:1173
init @ require.js:786
(anonymous) @ require.js:1457
setTimeout (async)
req.nextTick @ require.js:1812
localRequire @ require.js:1446
requirejs @ require.js:1794
Terrasoft.utils.common.require @ commonutils.js:487
getEntitySchema @ SchemaBuilderV2.js:94
initSchemaEntitySchema @ SchemaBuilderV2.js:154
nextStep @ commonutils.js:103
(anonymous) @ SchemaBuilderV2.js:142
(anonymous) @ commonutils.js:488
execCb @ require.js:1693
check @ require.js:881
enable @ require.js:1173
init @ require.js:786
(anonymous) @ require.js:1457
setTimeout (async)
req.nextTick @ require.js:1812
localRequire @ require.js:1446
requirejs @ require.js:1794
Terrasoft.utils.common.require @ commonutils.js:487
getSchemaResources @ SchemaBuilderV2.js:89
initSchemaResources @ SchemaBuilderV2.js:140
nextStep @ commonutils.js:103
initSchemaCustomAttributes @ SchemaBuilderV2.js:134
nextStep @ commonutils.js:103
requireSchema @ SchemaBuilderV2.js:114
nextStep @ commonutils.js:103
(anonymous) @ SchemaBuilderV2.js:221
nextStep @ commonutils.js:103
Terrasoft.utils.common.chain @ commonutils.js:106
requireAllSchemaHierarchy @ SchemaBuilderV2.js:219
buildSchemaHierarchy @ SchemaBuilderV2.js:317
(anonymous) @ SchemaBuilderV2.js:286
(anonymous) @ commonutils.js:488
execCb @ require.js:1693
check @ require.js:881
(anonymous) @ require.js:1136
(anonymous) @ require.js:134
(anonymous) @ require.js:1186
each @ require.js:59
emit @ require.js:1185
check @ require.js:936
enable @ require.js:1173
init @ require.js:786
callGetModule @ require.js:1200
completeLoad @ require.js:1587
onScriptLoad @ require.js:1714
core.js:581 user: BPMOutsource2/aa3ba720-d1cd-46f3-9cce-33ccc71e0113
file: https://msk10crm3.simple.ru:886/0/configuration/69de87c92ca4b610d0b1c9948902105fru-RU/ProfileUtilities.js
line: 90
column: 45
message: Uncaught TypeError: Cannot read property 'primaryDisplayColumn' of undefined
date: Tue Dec 19 2017 19:47:38 GMT+0300 (Russia TZ 2 Standard Time)
stack: TypeError: Cannot read property 'primaryDisplayColumn' of undefined
at constructor.<anonymous> (https://msk10crm3.simple.ru:886/0/configuration/69de87c92ca4b610d0b1c9948902105fru-RU/ProfileUtilities.js:90:45)
at constructor.nextStep (https://msk10crm3.simple.ru:886/0/core/hash/Terrasoft/utils/common/commonutils.js:103:10)
at https://msk10crm3.simple.ru:886/0/core/hash/Terrasoft/utils/common/commonutils.js:488:12
at Object.execCb (https://msk10crm3.simple.ru:886/core/c3a883e5c39cffb863b2f781f396c705/requirejs/require.js:1693:33)
at Module.check (https://msk10crm3.simple.ru:886/core/c3a883e5c39cffb863b2f781f396c705/requirejs/require.js:881:51)
at Module.enable (https://msk10crm3.simple.ru:886/core/c3a883e5c39cffb863b2f781f396c705/requirejs/require.js:1173:22)
at Module.init (https://msk10crm3.simple.ru:886/core/c3a883e5c39cffb863b2f781f396c705/requirejs/require.js:786:26)
at https://msk10crm3.simple.ru:886/core/c3a883e5c39cffb863b2f781f396c705/requirejs/require.js:1457:36
Также возникла проблема при попытке скрыть действие активной строки в зависимости от значения атрибута на странице. Если привязать видимость действия к атрибуту, то оно вообще перестаёт отображаться вне зависимости от его значения. Значение атрибута определяется при помощи запроса к сервису, сам метод вызывает из onRender.
//attributes
CanAddOrEdit: {
type: Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
dataValueType: Terrasoft.DataValueType.BOOLEAN,
value: false
},
//diff
{
"operation": "merge",
"name": "DataGridActiveRowCopyAction",
"values": {
"visible": {"bindTo": "CanAddOrEdit"}
}
}
Кто-то либо сталкивался с подобными проблемами?