diff --git a/entity/Organisation_entity/entityfields/campaignactiongroup/children/addtocampaignfromtable/stateProcess.js b/entity/Organisation_entity/entityfields/campaignactiongroup/children/addtocampaignfromtable/stateProcess.js index 9d2caf19d33cc0a8be852883401ff256e06fe5b9..35dcb1420a14ba006cfc657b2ac1208bc2b46d2e 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) {