Skip to content
Snippets Groups Projects
Commit 3e4a4004 authored by Sebastian Pongratz's avatar Sebastian Pongratz :ping_pong:
Browse files

Merge branch '2021.2.3' into '2021.2'

2021.2.3 > 2021.2

See merge request xrm/basic!1570
parents 07b3caef 9f75d23f
No related branches found
No related tags found
No related merge requests found
Showing
with 104 additions and 87 deletions
......@@ -12,10 +12,11 @@ if(vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW)
}
else if(vars.get("$field.ACTIVITYID"))
{
var count = new SqlBuilder().selectCount()
.from("ADVERTISING")
.where("ADVERTISING.OBJECT_ROWID", "ACTIVITY.ACTIVITYID")
.toString()
var count = new SqlBuilder()
.selectCount()
.from("ADVERTISING")
.where("ADVERTISING.OBJECT_ROWID", "ACTIVITY.ACTIVITYID")
.cell();
result.string(count);
}
......@@ -119,10 +119,6 @@
</entityActionField>
</children>
</entityActionGroup>
<entityField>
<name>PROBLEM</name>
<title>Problem</title>
</entityField>
<entityConsumer>
<name>EmailAdresses</name>
<dependency>
......@@ -190,13 +186,7 @@
<entityParameter>
<name>ExcludedStatus_param</name>
<valueProcess>%aditoprj%/entity/BulkMailRecipient_entity/entityfields/recipientstobemailed/children/excludedstatus_param/valueProcess.js</valueProcess>
<expose v="false" />
</entityParameter>
<entityParameter>
<name>ExcludeCommunicationRejecting_param</name>
<valueProcess>%aditoprj%/entity/BulkMailRecipient_entity/entityfields/recipientstobemailed/children/excludecommunicationrejecting_param/valueProcess.js</valueProcess>
<expose v="false" />
<title></title>
<expose v="true" />
</entityParameter>
</children>
</entityProvider>
......@@ -293,14 +283,6 @@
<recordfield>BULKMAILRECIPIENT.EMAIL_ADDRESS</recordfield>
<isFilterable v="true" />
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>PROBLEM.value</name>
<recordfield>BULKMAILRECIPIENT.PROBLEM</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>PROBLEM.displayValue</name>
<expression>%aditoprj%/entity/BulkMailRecipient_entity/recordcontainers/db/recordfieldmappings/problem.displayvalue/expression.js</expression>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>IS_TEST_RECIPIENT.value</name>
<recordfield>BULKMAILRECIPIENT.IS_TEST_RECIPIENT</recordfield>
......
import("system.result");
result.string(true);
\ No newline at end of file
......@@ -3,6 +3,8 @@ import("system.result");
result.string(JSON.stringify([
$KeywordRegistry.bulkMailRecipientStatus$sent(),
$KeywordRegistry.bulkMailRecipientStatus$hardBounce(),
$KeywordRegistry.bulkMailRecipientStatus$failed()
$KeywordRegistry.bulkMailRecipientStatus$failed(),
$KeywordRegistry.bulkMailRecipientStatus$softBounce(),
$KeywordRegistry.bulkMailRecipientStatus$hardBounce(),
$KeywordRegistry.bulkMailRecipientStatus$added()
]));
\ No newline at end of file
import("system.vars");
import("Util_lib");
import("Sql_lib");
import("Contact_lib");
import("system.translate");
import("system.result");
import("Keyword_lib");
import("KeywordRegistry_basic");
import("MarketingCondition_lib");
var keywordSql = KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.bulkMailRecipientStatus(), "BULKMAILRECIPIENT.STATUS");
var sql;
if (!Utils.toBoolean(vars.get("$param.ExcludeCommunicationRejecting_param")))
{
var communicationSettingsCondition = new CommunicationSettingsCondition()
.medium($KeywordRegistry.communicationMediumCampaign$mail(), "BULKMAILRECIPIENT.EMAIL_ADDRESS")
.rejected()
.existSettings()
.buildCondition();
sql = SqlBuilder.caseWhen(communicationSettingsCondition)
.thenString(translate.text("Advertising ban"))
.elseValue(keywordSql);
}
else
{
sql = keywordSql;
}
result.string(sql.toString());
result.string(keywordSql.toString());
......@@ -602,6 +602,13 @@
<stateProcess>%aditoprj%/entity/BulkMail_entity/entityfields/sendmail/stateProcess.js</stateProcess>
<tooltipProcess>%aditoprj%/entity/BulkMail_entity/entityfields/sendmail/tooltipProcess.js</tooltipProcess>
</entityActionField>
<entityActionField>
<name>ContinueMailing_action</name>
<title>Continue mailing</title>
<onActionProcess>%aditoprj%/entity/BulkMail_entity/entityfields/continuemailing_action/onActionProcess.js</onActionProcess>
<iconId>NEON:RECURRING_APPOINTMENT</iconId>
<stateProcess>%aditoprj%/entity/BulkMail_entity/entityfields/continuemailing_action/stateProcess.js</stateProcess>
</entityActionField>
<entityActionField>
<name>downloadTemplate</name>
<title>Download template</title>
......
import("system.translate");
import("system.question");
import("Sql_lib");
import("system.neon");
import("system.vars");
import("Bulkmail_lib");
import("system.db");
import("KeywordRegistry_basic");
var send = question.askYesNo(translate.text("Bulk mail"), translate.text("Should the mail be sent now?"), false);
if (send)
{
//UPDATE BULKMAIL STATUS
newWhere("BULKMAIL.BULKMAILID", "$field.BULKMAILID")
.updateFields({"STATUS" : $KeywordRegistry.bulkMailStatus$beingSent()});
neon.refreshAll();
BulkMailUtils.sendBulkMailOnServer(vars.get("$field.BULKMAILID"));
}
\ No newline at end of file
import("KeywordRegistry_basic");
import("system.result");
import("system.vars");
import("system.tools");
import("Bulkmail_lib");
import("system.neon");
if (tools.currentUserHasRole("INTERNAL_ADMINISTRATOR")
&& vars.get("$field.STATUS") === $KeywordRegistry.bulkMailStatus$failed()
&& BulkMailUtils.hasPendingRecipient(vars.get("$field.BULKMAILID")))
{
result.string(neon.COMPONENTSTATE_EDITABLE);
}
else
{
result.string(neon.COMPONENTSTATE_INVISIBLE);
}
\ No newline at end of file
......@@ -55,7 +55,7 @@ if (vars.get("$param.CopyBulkMailId_param") && Utils.toBoolean(vars.get("$field.
return sqlBuilder.buildInsertStatement({
"BULKMAIL_ID": bulkMailId,
"CONTACT_ID": contactId,
"STATUS": $KeywordRegistry.bulkMailRecipientStatus$pending(),
"STATUS": $KeywordRegistry.bulkMailRecipientStatus$added(),
"EMAIL_ADDRESS": email,
"IS_TEST_RECIPIENT": test
}, "BULKMAILRECIPIENT", "BULKMAILRECIPIENTID");
......
......@@ -21,7 +21,7 @@
<entityField>
<name>CLASSIFICATION</name>
<title>Category</title>
<consumer>KeywordsCathegories</consumer>
<consumer>KeywordsCategories</consumer>
<displayValueProcess>%aditoprj%/entity/DocumentTemplateTicketCategory_entity/entityfields/classification/displayValueProcess.js</displayValueProcess>
</entityField>
<entityParameter>
......@@ -29,7 +29,7 @@
<expose v="true" />
</entityParameter>
<entityConsumer>
<name>KeywordsCathegories</name>
<name>KeywordsCategories</name>
<dependency>
<name>dependency</name>
<entityName>KeywordEntry_entity</entityName>
......@@ -38,12 +38,12 @@
<children>
<entityParameter>
<name>ContainerName_param</name>
<valueProcess>%aditoprj%/entity/DocumentTemplateTicketCategory_entity/entityfields/keywordscathegories/children/containername_param/valueProcess.js</valueProcess>
<valueProcess>%aditoprj%/entity/DocumentTemplateTicketCategory_entity/entityfields/keywordscategories/children/containername_param/valueProcess.js</valueProcess>
</entityParameter>
</children>
</entityConsumer>
<entityProvider>
<name>DocumentTemplateClasificationsProv</name>
<name>DocumentTemplateClassificationsProv</name>
<titlePlural>Service ticket categories</titlePlural>
<children>
<entityParameter>
......
......@@ -232,7 +232,7 @@
<expose v="true" />
</entityParameter>
<entityParameter>
<name>ClasifcationMail_param</name>
<name>ClassificationMail_param</name>
<expose v="true" />
</entityParameter>
</children>
......@@ -299,7 +299,7 @@
<valueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/documenttemplate_objecttype/valueProcess.js</valueProcess>
</entityField>
<entityParameter>
<name>ClasifcationMail_param</name>
<name>ClassificationMail_param</name>
<expose v="true" />
</entityParameter>
<entityProvider>
......@@ -319,7 +319,7 @@
<dependency>
<name>dependency</name>
<entityName>DocumentTemplateTicketCategory_entity</entityName>
<fieldName>DocumentTemplateClasificationsProv</fieldName>
<fieldName>DocumentTemplateClassificationsProv</fieldName>
</dependency>
<children>
<entityParameter>
......
......@@ -4,7 +4,7 @@ import("system.result");
import("system.vars");
import("Sql_lib");
var sql = new SqlBuilder()
var count = new SqlBuilder()
.selectCount("CONTACT_ID")
.from("EMPLOYEEGROUP_CONTACT_RELATION")
.where("EMPLOYEEGROUP_CONTACT_RELATION.CONTACT_ID", vars.get("$field.CONTACT_ID"))
......@@ -12,8 +12,7 @@ var sql = new SqlBuilder()
.andIfSet("EMPLOYEEGROUP_CONTACT_RELATION.EMPLOYEEGROUP_CONTACT_RELATIONID", vars.get("$field.EMPLOYEEGROUP_CONTACT_RELATIONID"),SqlBuilder.NOT_EQUAL())
.cell();
if (sql > 0 )
if (count > 0)
{
result.string(translate.text("Employee already selected") + ".");
}
......@@ -20,6 +20,7 @@
<title>Employee group filter group</title>
<consumer>EmpGorupRuGroups</consumer>
<displayValueProcess>%aditoprj%/entity/EmployeeGroupRuleGroupRelation_entity/entityfields/employeegroup_rulegroup_id/displayValueProcess.js</displayValueProcess>
<onValidation>%aditoprj%/entity/EmployeeGroupRuleGroupRelation_entity/entityfields/employeegroup_rulegroup_id/onValidation.js</onValidation>
</entityField>
<entityField>
<name>EMPLOYEEGROUP_RULEGROUP_RELATIONID</name>
......
import("system.neon");
import("system.translate");
import("system.result");
import("system.vars");
import("Sql_lib");
var count = new SqlBuilder()
.selectCount("EMPLOYEEGROUP_RULEGROUP_ID")
.from("EMPLOYEEGROUP_RULEGROUP_RELATION")
.where("EMPLOYEEGROUP_RULEGROUP_RELATION.EMPLOYEEGROUP_RULEGROUP_ID", vars.get("$field.EMPLOYEEGROUP_RULEGROUP_ID"))
.and("EMPLOYEEGROUP_RULEGROUP_RELATION.EMPLOYEEGROUP_ID", vars.get("$field.EMPLOYEEGROUP_ID"))
.andIfSet("EMPLOYEEGROUP_RULEGROUP_RELATION.EMPLOYEEGROUP_RULEGROUP_RELATIONID", vars.get("$field.EMPLOYEEGROUP_RULEGROUP_RELATIONID"),SqlBuilder.NOT_EQUAL())
.cell();
if (count > 0)
{
result.string(translate.text("Rulegroup already selected") + ".");
}
\ No newline at end of file
......@@ -4,14 +4,14 @@ import("system.result");
import("system.vars");
import("Sql_lib");
var sql = new SqlBuilder()
var count = new SqlBuilder()
.selectCount("NAME")
.from("EMPLOYEEGROUP_RULEGROUP")
.where("EMPLOYEEGROUP_RULEGROUP.NAME", vars.get("$field.NAME"))
.and("EMPLOYEEGROUP_RULEGROUP.EMPLOYEEGROUP_RULEGROUPID", vars.get("sys.uid"),SqlBuilder.NOT_EQUAL())
.andIfSet("EMPLOYEEGROUP_RULEGROUP.EMPLOYEEGROUP_RULEGROUPID", vars.get("$field.EMPLOYEEGROUP_RULEGROUPID"),SqlBuilder.NOT_EQUAL())
.cell();
if (sql > 0)
if (count > 0)
{
result.string(translate.text("Name has to be unique") + ".");
}
\ No newline at end of file
import("system.logging");
import("system.result");
import("Keyword_lib");
import("KeywordRegistry_basic");
......@@ -6,6 +5,4 @@ import("system.util");
var sql = KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.employeeGroupStatus(), "STATE");
result.string(sql);
\ No newline at end of file
......@@ -4,13 +4,15 @@ import("system.result");
import("system.vars");
import("Sql_lib");
var sql = new SqlBuilder()
.selectCount("NAME")
.from("EMPLOYEEGROUP_RULEGROUP")
.where("EMPLOYEEGROUP_RULEGROUP.NAME", vars.get("$field.NAME"))
.andIfSet("EMPLOYEEGROUP_RULEGROUP.EMPLOYEEGROUP_RULEGROUPID", vars.get("$field.EMPLOYEEGROUP_RULEGROUP_ID"),SqlBuilder.NOT_EQUAL())
.cell();
if (sql > 0)
var count = new SqlBuilder()
.selectCount("NAME")
.from("EMPLOYEEGROUP_RULE")
.where("EMPLOYEEGROUP_RULE.NAME", vars.get("$field.NAME"))
.and("EMPLOYEEGROUP_RULE.EMPLOYEEGROUP_RULEGROUP_ID", vars.get("$field.EMPLOYEEGROUP_RULEGROUP_ID"))
.andIfSet("EMPLOYEEGROUP_RULE.EMPLOYEEGROUP_RULEID", vars.get("$field.EMPLOYEEGROUP_RULEID"),SqlBuilder.NOT_EQUAL())
.cell();
if (count > 0)
{
result.string(translate.text("Name has to be unique") + ".");
}
\ No newline at end of file
......@@ -4,13 +4,14 @@ import("system.result");
import("system.vars");
import("Sql_lib");
var sql = new SqlBuilder()
.selectCount("GROUPNAME")
.from("EMPLOYEEGROUP")
.where("EMPLOYEEGROUP.GROUPNAME", vars.get("$field.GROUPNAME"))
.and("EMPLOYEEGROUP.EMPLOYEEGROUPID", vars.get("sys.uid"),SqlBuilder.NOT_EQUAL())
.cell();
if (sql > 0)
var count = new SqlBuilder()
.selectCount("GROUPNAME")
.from("EMPLOYEEGROUP")
.where("EMPLOYEEGROUP.GROUPNAME", vars.get("$field.GROUPNAME"))
.andIfSet("EMPLOYEEGROUP.EMPLOYEEGROUPID", vars.get("$field.EMPLOYEEGROUPID"),SqlBuilder.NOT_EQUAL())
.cell();
if (count > 0)
{
result.string(translate.text("Name has to be unique") + ".");
}
\ No newline at end of file
import("system.logging");
import("system.result");
import("Keyword_lib");
import("KeywordRegistry_basic");
......@@ -6,6 +5,4 @@ import("system.util");
var sql = KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.employeeGroupStatus(), "STATUS");
result.string(sql);
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment