From 7c25f2a8fe90d5a92bd472146ffc1dc217df13e6 Mon Sep 17 00:00:00 2001 From: Yurii Date: Tue, 10 Mar 2026 20:22:41 +0200 Subject: [PATCH] link one duplicate ignore --- .../Espo/Core/Record/Duplicator/EntityDuplicator.php | 2 +- .../Modules/Crm/Resources/metadata/entityDefs/Lead.json | 9 ++++++--- application/Espo/Resources/metadata/entityDefs/User.json | 1 + application/Espo/Tools/LinkManager/LinkManager.php | 2 ++ 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/application/Espo/Core/Record/Duplicator/EntityDuplicator.php b/application/Espo/Core/Record/Duplicator/EntityDuplicator.php index fe4b1d40b9..50eaec63f7 100644 --- a/application/Espo/Core/Record/Duplicator/EntityDuplicator.php +++ b/application/Espo/Core/Record/Duplicator/EntityDuplicator.php @@ -134,7 +134,7 @@ class EntityDuplicator { $type = $fieldDefs->getType(); - if (in_array($type, [FieldType::AUTOINCREMENT, FieldType::NUMBER])) { + if (in_array($type, [FieldType::AUTOINCREMENT, FieldType::NUMBER, FieldType::LINK_ONE])) { return true; } diff --git a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Lead.json b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Lead.json index 83341058c2..0ad5e2e36e 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Lead.json +++ b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Lead.json @@ -216,19 +216,22 @@ "createdAccount": { "type": "link", "layoutDetailDisabled": true, - "layoutMassUpdateDisabled": true + "layoutMassUpdateDisabled": true, + "duplicateIgnore": true }, "createdContact": { "type": "link", "layoutDetailDisabled": true, "layoutMassUpdateDisabled": true, - "view": "crm:views/lead/fields/created-contact" + "view": "crm:views/lead/fields/created-contact", + "duplicateIgnore": true }, "createdOpportunity": { "type": "link", "layoutDetailDisabled": true, "layoutMassUpdateDisabled": true, - "view": "crm:views/lead/fields/created-opportunity" + "view": "crm:views/lead/fields/created-opportunity", + "duplicateIgnore": true }, "targetLists": { "type": "linkMultiple", diff --git a/application/Espo/Resources/metadata/entityDefs/User.json b/application/Espo/Resources/metadata/entityDefs/User.json index 4bf8360b3d..cb58cbfdb3 100644 --- a/application/Espo/Resources/metadata/entityDefs/User.json +++ b/application/Espo/Resources/metadata/entityDefs/User.json @@ -394,6 +394,7 @@ "tooltipText" ], "audited": true, + "duplicateIgnore": true, "dynamicLogicVisibleDisabled": true }, "accounts": { diff --git a/application/Espo/Tools/LinkManager/LinkManager.php b/application/Espo/Tools/LinkManager/LinkManager.php index ee9623498f..0a1deed335 100644 --- a/application/Espo/Tools/LinkManager/LinkManager.php +++ b/application/Espo/Tools/LinkManager/LinkManager.php @@ -343,6 +343,7 @@ class LinkManager 'fields' => [ $linkForeign => [ FieldParam::TYPE => FieldType::LINK, + 'duplicateIgnore' => true, ], ], 'links' => [ @@ -359,6 +360,7 @@ class LinkManager 'fields' => [ $link => [ FieldParam::TYPE => FieldType::LINK, + 'duplicateIgnore' => true, ], ], 'links' => [