From a344a13fcd802a80e703861f4f54351ab6d75c4a Mon Sep 17 00:00:00 2001
From: Benjamin Ulrich <b.ulrich@adito.de>
Date: Tue, 25 May 2021 13:45:31 +0000
Subject: [PATCH] Merge branch
 'sales_pn_1080118_autochecklist_source_notworking' into '2021.1'
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[Projekt: xRM-Sales][TicketNr.: 1080118][Automatische checklisteneinträge...

See merge request xrm/basic!965

(cherry picked from commit e5da4d1b99dd824cbc41dfb19d5fdcfef0dd78dd)

b9dd62b3 [Projekt: xRM-Sales][TicketNr.: 1080118][Automatische checklisteneinträge...
---
 process/ChecklistEntryRegistry_basic/process.js | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/process/ChecklistEntryRegistry_basic/process.js b/process/ChecklistEntryRegistry_basic/process.js
index 3cc7f7907d..53e11df9ba 100644
--- a/process/ChecklistEntryRegistry_basic/process.js
+++ b/process/ChecklistEntryRegistry_basic/process.js
@@ -516,14 +516,11 @@ $ChecklistEntryRegistry.salesprojectContactsGenerationSource = function(){
     return{
         title: translate.text("Source / origin of the generation of contacts"),
         verifierFn: function(pSalesprojectId){
-            return parseInt(AttributeRelationUtils.getAttributeSqlBuilder(
-                    ["count(*)"],
-                    pSalesprojectId,
-                    "Salesproject"
-                )
-                .and("AB_ATTRIBUTE.ATTRIBUTE_PARENT_ID", "d0ae40d2-1a7f-45f6-bb0c-20ce6ae7efe2")
-                .cell()
-            ) > 0;
+            return new AttributeRelationQuery(
+                pSalesprojectId,
+                "d0ae40d2-1a7f-45f6-bb0c-20ce6ae7efe2",
+                "Salesproject"
+            ).getAttributeCount() > 0;
         }
     };
 }
-- 
GitLab