From 40c0a7427995603125e051e9971e5cac0e5b328e Mon Sep 17 00:00:00 2001 From: Yurii Date: Wed, 24 Dec 2025 10:33:12 +0200 Subject: [PATCH] directUpdateEnabled, importEnabled parameters --- .../Crm/Resources/metadata/entityDefs/Account.json | 4 +++- .../Crm/Resources/metadata/entityDefs/Contact.json | 6 ++++-- .../Crm/Resources/metadata/entityDefs/Lead.json | 4 +++- client/src/views/import/step2.js | 8 ++++++-- schema/metadata/entityDefs.json | 10 +++++++++- 5 files changed, 25 insertions(+), 7 deletions(-) diff --git a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Account.json b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Account.json index f6723076f1..64b32a7197 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Account.json +++ b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Account.json @@ -201,6 +201,7 @@ "importDisabled": true, "exportDisabled": true, "directAccessDisabled": true, + "directUpdateEnabled": true, "filtersEnabled": true, "noLoad": true }, @@ -213,7 +214,8 @@ "layoutMassUpdateDisabled": true, "layoutFiltersDisabled": true, "entity": "TargetList", - "directAccessDisabled": true + "directAccessDisabled": true, + "importEnabled": true }, "originalLead": { "type": "linkOne", diff --git a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Contact.json b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Contact.json index aaefb17549..f8a06f8003 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Contact.json +++ b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Contact.json @@ -480,7 +480,8 @@ "layoutListDisabled": true, "importDisabled": true, "directAccessDisabled": true, - "filtersEnabled": true, + "filtersEnabled": true,, + "directUpdateEnabled": true, "noLoad": true }, "targetList": { @@ -493,7 +494,8 @@ "layoutFiltersDisabled": true, "exportDisabled": true, "entity": "TargetList", - "directAccessDisabled": true + "directAccessDisabled": true, + "importEnabled": true }, "portalUser": { "type": "linkOne", diff --git a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Lead.json b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Lead.json index 25a300bfa3..83341058c2 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Lead.json +++ b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Lead.json @@ -236,6 +236,7 @@ "layoutListDisabled": true, "importDisabled": true, "directAccessDisabled": true, + "directUpdateEnabled": true, "filtersEnabled": true, "noLoad": true }, @@ -248,7 +249,8 @@ "layoutMassUpdateDisabled": true, "layoutFiltersDisabled": true, "entity": "TargetList", - "directAccessDisabled": true + "directAccessDisabled": true, + "importEnabled": true }, "targetListIsOptedOut": { "type": "bool", diff --git a/client/src/views/import/step2.js b/client/src/views/import/step2.js index 470eaf837f..d7c6d7e952 100644 --- a/client/src/views/import/step2.js +++ b/client/src/views/import/step2.js @@ -358,7 +358,9 @@ class Step2ImportView extends View { ( d.disabled || d.importDisabled || - d.utility + d.utility || + d.directAccessDisabled && !d.importEnabled || + d.directUpdateDisabled && !d.importEnabled && !d.directUpdateEnabled ) ) { continue; @@ -399,7 +401,9 @@ class Step2ImportView extends View { ( defs.disabled || defs.importDisabled || - defs.utility + defs.utility || + defs.directAccessDisabled && !defs.importEnabled || + defs.directUpdateDisabled && !defs.importEnabled && !defs.directUpdateEnabled ) ) { continue; diff --git a/schema/metadata/entityDefs.json b/schema/metadata/entityDefs.json index a49ec74435..f6dac9a47f 100644 --- a/schema/metadata/entityDefs.json +++ b/schema/metadata/entityDefs.json @@ -1100,12 +1100,16 @@ }, "directAccessDisabled": { "type": "boolean", - "description": "Indicates that the field value is not accessed directly but through some additional logic. The filed won't be available in PDF Templates, Email Templates and some other tools." + "description": "Indicates that the field value is not accessed or written directly but through some additional logic. The field won't be available in PDF Templates, Email Templates, and some other tools." }, "directUpdateDisabled": { "type": "boolean", "description": "Indicates that updating the field directly is not possible." }, + "directUpdateEnabled": { + "type": "boolean", + "description": "Indicates that updating the field directly is possible. To be used if directAccessDisabled is true to indicate that update is possible. As of v9.3.0." + }, "foreignAccessDisabled": { "type": "boolean", "description": "Indicates that access to the field through a link is not feasible." @@ -1118,6 +1122,10 @@ "type": "boolean", "description": "Disables the ability to import the field." }, + "importEnabled": { + "type": "boolean", + "description": "Indicates that import for the field is allowed even if directAccessDisabled or directUpdateDisabled are true. As of v9.3.0." + }, "exportDisabled": { "type": "boolean", "description": "Disables the ability to export the field."