diff --git a/.liquibase/Data_alias/basic/_demoData/generatedData/visitplanentry.xml b/.liquibase/Data_alias/basic/_demoData/generatedData/visitplanentry.xml
index 464ef79ee2f355f8cd103fc6a108e28327e65561..1eb9ccc154c4f9913260155a5a8d4e0aed2b306e 100644
--- a/.liquibase/Data_alias/basic/_demoData/generatedData/visitplanentry.xml
+++ b/.liquibase/Data_alias/basic/_demoData/generatedData/visitplanentry.xml
@@ -6,8 +6,8 @@
       <column name="ENTRYDATE" valueDate="2021-10-27"/>
       <column name="VISITPLANEMPLOYEEWEEK_ID" value="9a9258a7-1f6c-4c5e-bf36-373e9e062ff1"/>
       <column name="ORGANISATION_CONTACT_ID" value="33ae2997-7bff-4c3c-8038-2fa6781dbe9d"/>
-      <column name="END_TIME" valueDate="1970-01-01T04:30:00"/>
-      <column name="BEGIN_TIME" valueDate="1970-01-01T02:30:00"/>
+      <column name="END_TIME" valueDate="04:30:00"/>
+      <column name="BEGIN_TIME" valueDate="02:30:00"/>
       <column name="VISITPLANENTRYID" value="042f069f-247b-41d3-bf37-4b51f27fa149"/>
       <column name="CONTACT_ID" value="0cb0af25-dbd0-4e82-92e2-8afd03acbf36"/>
       <column name="STATUS" value="VISITSTATUSPLANNED"/>
@@ -18,8 +18,8 @@
       <column name="ENTRYDATE" valueDate="2021-10-15"/>
       <column name="VISITPLANEMPLOYEEWEEK_ID" value="c003ea92-d27c-4a6c-a669-dec4f0c5989d"/>
       <column name="ORGANISATION_CONTACT_ID" value="449080f6-b714-4189-a261-37439d0d4010"/>
-      <column name="END_TIME" valueDate="1970-01-01T03:30:00"/>
-      <column name="BEGIN_TIME" valueDate="1970-01-01T02:30:00"/>
+      <column name="END_TIME" valueDate="03:30:00"/>
+      <column name="BEGIN_TIME" valueDate="02:30:00"/>
       <column name="VISITPLANENTRYID" value="10c12625-40dd-4b54-b4ab-053c73c71643"/>
       <column name="CONTACT_ID" value="227ec10d-7bf4-4cf7-824f-8b1d7625bd6e"/>
       <column name="STATUS" value="VISITSTATUSPLANNED"/>
@@ -30,8 +30,8 @@
       <column name="ENTRYDATE" valueDate="2021-10-25"/>
       <column name="VISITPLANEMPLOYEEWEEK_ID" value="9a9258a7-1f6c-4c5e-bf36-373e9e062ff1"/>
       <column name="ORGANISATION_CONTACT_ID" value="cabf6192-f9c3-4bd4-9366-ad2b073bdfa3"/>
-      <column name="END_TIME" valueDate="1970-01-01T11:30:00"/>
-      <column name="BEGIN_TIME" valueDate="1970-01-01T10:30:00"/>
+      <column name="END_TIME" valueDate="11:30:00"/>
+      <column name="BEGIN_TIME" valueDate="10:30:00"/>
       <column name="VISITPLANENTRYID" value="131a2e5c-0df2-4a65-a26b-250d13874907"/>
       <column name="CONTACT_ID" value="d8c97366-65b4-4510-b212-ed52eed5f8d2"/>
       <column name="STATUS" value="VISITSTATUSPLANNED"/>
@@ -42,8 +42,8 @@
       <column name="ENTRYDATE" valueDate="2021-10-27"/>
       <column name="VISITPLANEMPLOYEEWEEK_ID" value="9a9258a7-1f6c-4c5e-bf36-373e9e062ff1"/>
       <column name="ORGANISATION_CONTACT_ID" value="2a45eaab-3638-42fa-82ec-1b6893cb6a30"/>
-      <column name="END_TIME" valueDate="1970-01-01T10:00:00"/>
-      <column name="BEGIN_TIME" valueDate="1970-01-01T09:00:00"/>
+      <column name="END_TIME" valueDate="10:00:00"/>
+      <column name="BEGIN_TIME" valueDate="09:00:00"/>
       <column name="VISITPLANENTRYID" value="38875dfd-106b-4f15-93b3-63b39331d37a"/>
       <column name="CONTACT_ID" value="7c0b4ee5-2012-4c91-8980-502c1602329b"/>
       <column name="STATUS" value="VISITSTATUSPLANNED"/>
@@ -54,8 +54,8 @@
       <column name="ENTRYDATE" valueDate="2021-10-21"/>
       <column name="VISITPLANEMPLOYEEWEEK_ID" value="fc87e29b-aee1-40ec-a5a1-95c4e3f1d86e"/>
       <column name="ORGANISATION_CONTACT_ID" value="a059aa9d-0463-4dbd-8b54-e85e235e63e0"/>
-      <column name="END_TIME" valueDate="1970-01-01T11:00:00"/>
-      <column name="BEGIN_TIME" valueDate="1970-01-01T10:00:00"/>
+      <column name="END_TIME" valueDate="11:00:00"/>
+      <column name="BEGIN_TIME" valueDate="10:00:00"/>
       <column name="VISITPLANENTRYID" value="cf2b7bc1-db77-4ebf-a292-fdeb8f015df8"/>
       <column name="CONTACT_ID" value="7de6316b-62aa-4bea-a186-702c1b87a15c"/>
       <column name="STATUS" value="VISITSTATUSPLANNED"/>
diff --git a/.liquibase/_____SYSTEMALIAS/basic/_demoData/example_asys_users/insert_asys_users-admin.xml b/.liquibase/_____SYSTEMALIAS/basic/_demoData/example_asys_users/insert_asys_users-admin.xml
index 37b15567b1bf928b3d95b912970a358b01c085f3..533890d946c98746e51f48ff96d7c40edc5b922c 100644
--- a/.liquibase/_____SYSTEMALIAS/basic/_demoData/example_asys_users/insert_asys_users-admin.xml
+++ b/.liquibase/_____SYSTEMALIAS/basic/_demoData/example_asys_users/insert_asys_users-admin.xml
@@ -3403,15 +3403,6 @@
       <column name="DATE_NEW" valueDate="2021-10-07T08:08:56"/>
       <column name="PROPKEY" value="#u:activitydrawer_view.#entity.salesprojectactivity_view.activities.salesprojectmain_view.#entity.activityfilter_view.children.activitiestreetable:actionsvisible"/>
     </insert>
-    <insert tableName="ASYS_USERS">
-      <column name="GROUPID" value="PASSWORD"/>
-      <column name="DATE_EDIT" valueDate="2018-12-07T02:45:08"/>
-      <column name="NAME" value="_____USER_bcdfb521-c7d0-4ef1-8916-78e7d3232046"/>
-      <column name="ID" value="7a9a5b3b-9fde-4822-9198-06692be1fc0f"/>
-      <column name="PROPVAL" value="1533122217399"/>
-      <column name="DATE_NEW" valueDate="2018-05-25T07:52:30"/>
-      <column name="PROPKEY" value="passwordChanged"/>
-    </insert>
     <insert tableName="ASYS_USERS">
       <column name="GROUPID" value="NEONSETTINGS"/>
       <column name="DATE_EDIT" valueDate="2021-10-13T12:18:22"/>
@@ -3421,6 +3412,24 @@
       <column name="DATE_NEW" valueDate="2021-10-06T11:38:14"/>
       <column name="PROPKEY" value="#u:activityfilter_view.#entity.activitydrawer_view.#entity.supportticketmain_view.activities.activityanalyses_view.children.dynamicchart:actionsvisible"/>
     </insert>
+    <insert tableName="ASYS_USERS">
+      <column name="GROUPID" value="PASSWORD"/>
+      <column name="NAME" value="_____USER_bcdfb521-c7d0-4ef1-8916-78e7d3232046"/>
+      <column name="DATE_EDIT" valueDate="2018-12-07T03:45:08"/>
+      <column name="ID" value="ef8097ea-206d-456f-bebe-144d8190ef6f"/>
+      <column name="PROPVAL" value="SHA256S:8BA6557C1C12BD7B9FF24147B71ECB36AC04CD6F7F0E7C84677E06C0CA6EAFD5:3FFDE946723B844B3F5B21D3AE1CF87FAC182CC21D1EDA3F76E781C3F63EEE9F"/>
+      <column name="PROPKEY" value="password"/>
+      <column name="DATE_NEW" valueDate="2018-05-25T09:52:30"/>
+    </insert>
+    <insert tableName="ASYS_USERS">
+      <column name="GROUPID" value="PASSWORD"/>
+      <column name="NAME" value="_____USER_bcdfb521-c7d0-4ef1-8916-78e7d3232046"/>
+      <column name="DATE_EDIT" valueDate="2018-12-07T03:45:08"/>
+      <column name="ID" value="7a9a5b3b-9fde-4822-9198-06692be1fc0f"/>
+      <column name="PROPVAL" value="1533122217399"/>
+      <column name="PROPKEY" value="passwordChanged"/>
+      <column name="DATE_NEW" valueDate="2018-05-25T09:52:30"/>
+    </insert>
     <insert tableName="ASYS_USERS">
       <column name="GROUPID" value="NEONSETTINGS"/>
       <column name="DATE_EDIT" valueDate="2021-10-13T08:14:41"/>
@@ -4051,15 +4060,6 @@
       <column name="DATE_NEW" valueDate="2021-10-15T07:53:06"/>
       <column name="PROPKEY" value="#FILTER:EmailFilterHandling_entity.LAST:828eb657-6a2c-45c6-8e5b-ddb7a7bf2047"/>
     </insert>
-    <insert tableName="ASYS_USERS">
-      <column name="GROUPID" value="PASSWORD"/>
-      <column name="DATE_EDIT" valueDate="2021-10-15T12:52:07"/>
-      <column name="NAME" value="_____USER_bcdfb521-c7d0-4ef1-8916-78e7d3232046"/>
-      <column name="ID" value="914b20ee-2181-4d24-9125-51837c2c4ca0"/>
-      <column name="PROPVAL" value="1634302327529"/>
-      <column name="DATE_NEW" valueDate="2021-10-05T10:02:30"/>
-      <column name="PROPKEY" value="lastLogin"/>
-    </insert>
     <insert tableName="ASYS_USERS">
       <column name="GROUPID" value="NEONSETTINGS"/>
       <column name="DATE_EDIT" valueDate="2021-10-11T12:56:45"/>
@@ -6220,15 +6220,6 @@
       <column name="DATE_NEW" valueDate="2021-10-06T08:55:22"/>
       <column name="PROPKEY" value="#u:role_entity:saved_filter_open"/>
     </insert>
-    <insert tableName="ASYS_USERS">
-      <column name="GROUPID" value="PASSWORD"/>
-      <column name="DATE_EDIT" valueDate="2021-10-15T01:28:46"/>
-      <column name="NAME" value="_____USER_bcdfb521-c7d0-4ef1-8916-78e7d3232046"/>
-      <column name="ID" value="e4370a21-f9f7-492a-b51b-f676b155e048"/>
-      <column name="PROPVAL" value="1634304526994"/>
-      <column name="DATE_NEW" valueDate="2021-10-05T11:35:49"/>
-      <column name="PROPKEY" value="lastLogout"/>
-    </insert>
     <insert tableName="ASYS_USERS">
       <column name="GROUPID" value="NEONSETTINGS"/>
       <column name="DATE_EDIT" valueDate="2021-10-06T08:57:00"/>
@@ -6481,15 +6472,6 @@
       <column name="DATE_NEW" valueDate="2021-10-12T02:41:30"/>
       <column name="PROPKEY" value="#FILTER:SupportTicketTemplate_entity.LAST:92ad5110-9e4e-4fe3-8ef7-c7ce624863db"/>
     </insert>
-    <insert tableName="ASYS_USERS">
-      <column name="GROUPID" value="PASSWORD"/>
-      <column name="DATE_EDIT" valueDate="2018-12-07T02:45:08"/>
-      <column name="NAME" value="_____USER_bcdfb521-c7d0-4ef1-8916-78e7d3232046"/>
-      <column name="ID" value="ef8097ea-206d-456f-bebe-144d8190ef6f"/>
-      <column name="PROPVAL" value="SHA256S:A77845E45272B3B08C6D88671DCCA88CAB1288AC891BE53E9800760AE9255D61:8443C44D9A3AA2711CE80C06447B9ACD000D3F17D9999B9CC0E66D8527FC84EA"/>
-      <column name="DATE_NEW" valueDate="2018-05-25T07:52:30"/>
-      <column name="PROPKEY" value="password"/>
-    </insert>
     <insert tableName="ASYS_USERS">
       <column name="GROUPID" value="NEONSETTINGS"/>
       <column name="DATE_EDIT" valueDate="2021-10-13T12:06:22"/>
diff --git a/entity/Activity_entity/entityfields/newtask/onActionProcess.js b/entity/Activity_entity/entityfields/newtask/onActionProcess.js
index 37bc32f556eb29135ab1339e0f4d98e9ffa9df11..cc85adfd7cee5e2bcbce9994bcce81161b2a7135 100644
--- a/entity/Activity_entity/entityfields/newtask/onActionProcess.js
+++ b/entity/Activity_entity/entityfields/newtask/onActionProcess.js
@@ -2,4 +2,4 @@ import("system.vars");
 import("ActivityTask_lib");
 import("Context_lib");
 
-TaskUtils.createNewTask(undefined, undefined, ContextUtils.getCurrentContextId(), vars.get("$field.ACTIVITYID"), {"Description_param" : vars.get("$field.INFO"), "Subject_param": vars.get("$field.SUBJECT")});
\ No newline at end of file
+TaskUtils.createNewTask(undefined, [[vars.get("$sys.currentcontextname"), vars.get("$field.ACTIVITYID")]], ContextUtils.getCurrentContextId(), vars.get("$field.ACTIVITYID"), {"Description_param" : vars.get("$field.INFO"), "Subject_param": vars.get("$field.SUBJECT")});
\ No newline at end of file
diff --git a/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/advertisingban_icon.value/expression.js b/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/advertisingban_icon.value/expression.js
index e5f98a118e95f457dd7ff4f5a74986a409ee6213..127cc8363d7ab3ef4f23ed91fb613da71f8476ff 100644
--- a/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/advertisingban_icon.value/expression.js
+++ b/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/advertisingban_icon.value/expression.js
@@ -10,4 +10,4 @@ var condition = new CommunicationSettingsCondition()
     .existSettings()
     .buildCondition();
     
-result.string(condition.toString());
\ No newline at end of file
+result.string("case when " + condition.toString() + " then 1 else 0 end");
\ No newline at end of file
diff --git a/entity/Productprice_entity/onValidation.js b/entity/Productprice_entity/onValidation.js
index bc32d44d44f0f4508f4a090173f1f855c2fd3bd5..ffa8af2f179045a2f17f51042d19489a3b4347ca 100644
--- a/entity/Productprice_entity/onValidation.js
+++ b/entity/Productprice_entity/onValidation.js
@@ -81,7 +81,7 @@ if(vars.getString("$param.IgnoreOnValidation_param") != "true")
                 || Utils.isNullOrEmptyString(currPriceList["relationId"]) && Utils.isNullOrEmptyString(vars.get("$param.ContactId_param"))) 
                 && currPriceList["currency"] == currency)
             {
-                if(currPriceList["validFrom"] <= validFrom && (validTo >= currPriceList["validTo"] || Utils.isNotNullOrEmptyString(currPriceList["validTo"])))
+                if(currPriceList["validFrom"] >= validFrom && (validTo >= currPriceList["validTo"] || Utils.isNullOrEmptyString(validTo)))
                 {
                     result.string(translate.withArguments("There already exists a %0 price with the same type of pricelist, quantity and currency in the defined range.", [vars.get("$field.BUYSELL")]));
                 }
diff --git a/entity/Task_entity/afterSave.js b/entity/Task_entity/afterSave.js
index 267d8e8163e6eee4e99e0d1ff18500f3e369c928..a7a8810fcc961c36102ddf7722037671c4e29fc8 100644
--- a/entity/Task_entity/afterSave.js
+++ b/entity/Task_entity/afterSave.js
@@ -13,9 +13,10 @@ var data = vars.get("$local.entitydata")
 var contactIds = newSelect("CONTACT_ID")
 .from("TASKATTENDEES")
 .where("TASKATTENDEES.TASK_ID", data["TASKID"])
+.and("TASKATTENDEES.DEPARTMENT_ID is null")
 .arrayColumn();
 
-var avaiableAttendees = contactIds;
+var avaiableAttendees = contactIds; // all Attendees without department user
 
 if(contactIds.length > 0)
     var contactIdsAvaiable = contactIds[0].length > 0;
@@ -67,7 +68,7 @@ if(data["createSingleTasks"] == 1 && vars.get("$local.recordstate") == "NEW" &&
     
     //remove duplicates in contactIds
     contactIds = Array.from(new Set(contactIds));
-    
+
     var colsTask = [
     "TASKID",
     "KIND",
@@ -133,7 +134,7 @@ if(data["createSingleTasks"] == 1 && vars.get("$local.recordstate") == "NEW" &&
         var condAttendees = "TASK_ID = '" + data["TASKID"] + "' and CONTACT_ID = '" + contactIds[i] + "'"
         
         db.insertData("TASK", colsTask, null, valsTask);
-        
+
         if(avaiableAttendees.includes(contactIds[i]))
             db.updateData("TASKATTENDEES", ["TASK_ID"], null, [uuidTask], condAttendees);
         else db.insertData("TASKATTENDEES", colsAttendees, null, valsAttendees)
@@ -149,7 +150,7 @@ if(data["createSingleTasks"] == 1 && vars.get("$local.recordstate") == "NEW" &&
         
         newWhere("TASKATTENDEES.TASK_ID", data["TASKID"]).and("TASKATTENDEES.DEPARTMENT_ID is not null")
         .and("TASKATTENDEES.TASKATTENDEESID", departmentsAttendees, SqlBuilder.NOT_EQUAL()).deleteData()
-        
+
         db.updateData("TASKATTENDEES", ["DEPARTMENT_ID", "CONTACT_ID"], null, ["", contactIds[0]], "TASK_ID = '" + data["TASKID"] 
             + "' and DEPARTMENT_ID is not null")
         
@@ -187,6 +188,6 @@ else if(vars.get("$local.recordstate") == "NEW" && contactIds.length == 0) {
         data["TASKID"],
         EmployeeUtils.getCurrentContactId()
     ]
-    
+
     db.insertData("TASKATTENDEES", colsAttendees, null, valsAttendees)
 }
\ No newline at end of file
diff --git a/process/Binary_lib/process.js b/process/Binary_lib/process.js
index 42b5c995df062c2a7b73c1debe868ce148ff2d5b..a52ba3daa3b303faf1285610c02b351fa0dd0db8 100644
--- a/process/Binary_lib/process.js
+++ b/process/Binary_lib/process.js
@@ -84,6 +84,7 @@ function SingleBinaryUtils() {}
 SingleBinaryUtils.get = function(pAssignmentTable, pAssignmentName, pAssignmentRowId, pAlias, pKeyword)
 {
     pAlias = pAlias || SqlUtils.getBinariesAlias();
+    pKeyword = pKeyword || "";
     
     if (this.checkExistsOneTime(pAssignmentTable, pAssignmentName, pAssignmentRowId, pAlias, pKeyword))
     {
@@ -125,6 +126,7 @@ SingleBinaryUtils.get = function(pAssignmentTable, pAssignmentName, pAssignmentR
 SingleBinaryUtils.getMetadata = function(pAssignmentTable, pAssignmentName, pAssignmentRowId, pIncludePreview, pAlias, pKeyword)
 {
     pAlias = pAlias || SqlUtils.getBinariesAlias();
+    pKeyword = pKeyword || "";
     
     if (this.checkExistsOneTime(pAssignmentTable, pAssignmentName, pAssignmentRowId, pAlias, pKeyword))
     {
@@ -162,6 +164,7 @@ SingleBinaryUtils.getMetadata = function(pAssignmentTable, pAssignmentName, pAss
 SingleBinaryUtils.checkExistsOneTime = function(pAssignmentTable, pAssignmentName, pAssignmentRowId, pAlias, pKeyword)
 {   
     pAlias = pAlias || SqlUtils.getBinariesAlias();
+    pKeyword = pKeyword || "";
     var countBinary = db.getBinaryCount(pAssignmentTable, pAssignmentName, pAssignmentRowId, pAlias, pKeyword || null);
     
     if (countBinary == 0)
@@ -210,6 +213,7 @@ SingleBinaryUtils.checkExistsOneTime = function(pAssignmentTable, pAssignmentNam
 SingleBinaryUtils.insert = function(pAssignmentTable, pAssignmentName, pAssignmentRowId, pBase64, pFileName, pDescription, pKeyword, pAlias)
 {
     pAlias = pAlias || SqlUtils.getBinariesAlias();
+    pKeyword = pKeyword || "";
     
     if (!this.checkExistsOneTime(pAssignmentTable, pAssignmentName, pAssignmentRowId, pAlias, pKeyword))
     {
@@ -289,6 +293,8 @@ SingleBinaryUtils.update = function(pAssignmentTable, pAssignmentName, pAssignme
     if (pAlias == undefined) 
         pAlias = SqlUtils.getBinariesAlias();
     
+    pKeyword = pKeyword || "";
+    
     if (this.checkExistsOneTime(pAssignmentTable, pAssignmentName, pAssignmentRowId, pAlias, pKeyword))
     {
         var binaryMetadata = db.getBinaryMetadata(pAssignmentTable, pAssignmentName, pAssignmentRowId, false, pAlias, pKeyword)[0];