From 7c7be83147cd5ef0548ce1369fb94b911461e5c5 Mon Sep 17 00:00:00 2001
From: Robert Loipfinger <r.loipfinger@adito.de>
Date: Thu, 25 Jul 2019 09:22:34 +0200
Subject: [PATCH] Organisation.AddToCampaign: Error calculating rowcount

---
 .../children/addtocampaignfromtable/stateProcess.js            | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/entity/Organisation_entity/entityfields/campaignactiongroup/children/addtocampaignfromtable/stateProcess.js b/entity/Organisation_entity/entityfields/campaignactiongroup/children/addtocampaignfromtable/stateProcess.js
index 9d2caf19d33..35dcb1420a1 100644
--- a/entity/Organisation_entity/entityfields/campaignactiongroup/children/addtocampaignfromtable/stateProcess.js
+++ b/entity/Organisation_entity/entityfields/campaignactiongroup/children/addtocampaignfromtable/stateProcess.js
@@ -3,8 +3,7 @@ import("system.vars");
 import("system.neon");
 import("system.result");
 
-var query = "select count(*) from ORGANISATION where ORGANISATIONID != '0'"
-var contactCount = db.cell(query);
+var contactCount = vars.get("$sys.datarowcount");
 
 if(contactCount > 0)
 {
-- 
GitLab