Skip to content
Snippets Groups Projects
Commit 8635cf08 authored by Martin Groppe's avatar Martin Groppe
Browse files

Merge branch 'service_bugfixes' into '2021.2.0'

Service bugfixes

See merge request xrm/basic!1322
parents 2e2737b3 ad841090
No related branches found
No related tags found
No related merge requests found
Showing
with 154 additions and 15 deletions
......@@ -14,11 +14,8 @@ var res = {
"groupByKeyword":"OrderType"
},
"Contract": {},
"SupportTicket": {
"subContext":"TaskLink",
"childField":"TASK_ID",
"parentField":"TASK_TASKID",
"contactIdField":"OBJECT_ROWID"
"SupportTicket": {
"connectionField":"TASK_REQUESTOR_CONTACT_ID"
},
"Campaign": {
"subContext":"CampaignParticipant",
......
......@@ -165,7 +165,6 @@
<onValueChangeTypes>
<element>MASK</element>
</onValueChangeTypes>
<onValidation></onValidation>
</entityField>
<entityConsumer>
<name>DocumentTemplateTypeCategory</name>
......
......@@ -6,7 +6,7 @@ import("system.vars");
// --> only set in $field.Content.valueProcess if $field.Content is null and set it from here only if MASK triggered change
if((vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW))
{
[content, type] = DocumentTemplateUtils.getTemplateContent(vars.get("$field."), new FileUpload(vars.get("$local.value")));
[content, type] = DocumentTemplateUtils.getTemplateContent(vars.get("$field.DOCUMENTTEMPLATEID"), new FileUpload(vars.get("$local.value")));
vars.set("$context.currentTemplateType", type);
vars.set("$field.Content", content);
......
......@@ -4,10 +4,11 @@ import("system.vars");
import("system.result");
import("system.neon");
if(vars.get("$field.KIND") == $KeywordRegistry.documentTemplateType$attachment()
|| vars.get("$field.KIND") == $KeywordRegistry.documentTemplateType$signature()
|| vars.get("$field.KIND") == $KeywordRegistry.documentTemplateType$replymail()
&& vars.exists("$context.currentTemplateType") && vars.get("$context.currentTemplateType") != DocumentTemplate.types.ODT)
if((vars.get("$field.KIND") == $KeywordRegistry.documentTemplateType$attachment()
|| vars.get("$field.KIND") == $KeywordRegistry.documentTemplateType$signature()
|| vars.get("$field.KIND") == $KeywordRegistry.documentTemplateType$replymail())
|| (vars.get("$field.KIND") == $KeywordRegistry.documentTemplateType$letter()
&& vars.exists("$context.currentTemplateType") && vars.get("$context.currentTemplateType") != DocumentTemplate.types.ODT))
{
result.string(neon.COMPONENTSTATE_DISABLED);
}
......
......@@ -17,6 +17,7 @@
<consumer>Employees</consumer>
<linkedContextProcess></linkedContextProcess>
<displayValueProcess>%aditoprj%/entity/EmployeeGroupContactRelation_entity/entityfields/contact_id/displayValueProcess.js</displayValueProcess>
<onValidation>%aditoprj%/entity/EmployeeGroupContactRelation_entity/entityfields/contact_id/onValidation.js</onValidation>
</entityField>
<entityField>
<name>EMPLOYEEGROUP_CONTACT_RELATIONID</name>
......
import("system.neon");
import("system.translate");
import("system.result");
import("system.vars");
import("Sql_lib");
var sql = new SqlBuilder()
.selectCount("CONTACT_ID")
.from("EMPLOYEEGROUP_CONTACT_RELATION")
.where("EMPLOYEEGROUP_CONTACT_RELATION.CONTACT_ID", vars.get("$field.CONTACT_ID"))
.and("EMPLOYEEGROUP_CONTACT_RELATION.EMPLOYEEGROUP_ID", vars.get("$field.EMPLOYEEGROUP_ID"))
.andIfSet("EMPLOYEEGROUP_CONTACT_RELATION.EMPLOYEEGROUP_CONTACT_RELATIONID", vars.get("$field.EMPLOYEEGROUP_CONTACT_RELATIONID"),SqlBuilder.NOT_EQUAL())
.cell();
if (sql > 0 )
{
result.string(translate.text("Employee already selected") + ".");
}
......@@ -31,6 +31,7 @@
<name>NAME</name>
<title>Name</title>
<mandatory v="true" />
<onValidation>%aditoprj%/entity/EmployeeGroupRuleGroup_entity/entityfields/name/onValidation.js</onValidation>
</entityField>
<entityConsumer>
<name>EmpGroupRules</name>
......
import("system.neon");
import("system.translate");
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"))
.and("EMPLOYEEGROUP_RULEGROUP.EMPLOYEEGROUP_RULEGROUPID", vars.get("sys.uid"),SqlBuilder.NOT())
.cell();
if (sql > 0)
{
result.string(translate.text("Name has to be unique") + ".");
}
\ No newline at end of file
......@@ -36,6 +36,7 @@
<name>NAME</name>
<title>Name</title>
<mandatory v="true" />
<onValidation>%aditoprj%/entity/EmployeeGroupRule_entity/entityfields/name/onValidation.js</onValidation>
</entityField>
<entityProvider>
<name>#PROVIDER_AGGREGATES</name>
......
import("system.neon");
import("system.translate");
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)
{
result.string(translate.text("Name has to be unique") + ".");
}
\ No newline at end of file
......@@ -21,6 +21,7 @@
<name>GROUPNAME</name>
<title>Group name</title>
<mandatory v="true" />
<onValidation>%aditoprj%/entity/EmployeeGroup_entity/entityfields/groupname/onValidation.js</onValidation>
</entityField>
<entityProvider>
<name>EmployeesGroups</name>
......
import("system.neon");
import("system.translate");
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())
.cell();
if (sql > 0)
{
result.string(translate.text("Name has to be unique") + ".");
}
\ No newline at end of file
......@@ -19,6 +19,7 @@
<title>Employee Group</title>
<consumer>EmployeesGroupsForCompanyGroup</consumer>
<displayValueProcess>%aditoprj%/entity/InboxEmployeegroupRelation_entity/entityfields/employeegroup_id/displayValueProcess.js</displayValueProcess>
<onValidation>%aditoprj%/entity/InboxEmployeegroupRelation_entity/entityfields/employeegroup_id/onValidation.js</onValidation>
</entityField>
<entityField>
<name>INBOX_ID</name>
......
import("system.neon");
import("system.translate");
import("system.result");
import("system.vars");
import("Sql_lib");
var sql = new SqlBuilder()
.selectCount("EMPLOYEEGROUP_ID")
.from("INBOX_EMPLOYEEGROUP_RELATION")
.where("INBOX_EMPLOYEEGROUP_RELATION.EMPLOYEEGROUP_ID", vars.get("$field.EMPLOYEEGROUP_ID"))
.and("INBOX_EMPLOYEEGROUP_RELATION.INBOX_ID", vars.get("$field.INBOX_ID"))
.andIfSet("INBOX_EMPLOYEEGROUP_RELATION.INBOX_EMPLOYEEGROUP_RELATIONID", vars.get("$field.INBOX_EMPLOYEEGROUP_RELATIONID"),SqlBuilder.NOT_EQUAL())
.cell();
if (sql > 0)
{
result.string(translate.text("Employee group already selected") + ".");
}
\ No newline at end of file
......@@ -16,6 +16,8 @@
<name>INBOXFILTERGROUP_ID</name>
<title>Inbox filter group</title>
<consumer>InboxFilterGroups</consumer>
<displayValueProcess>%aditoprj%/entity/InboxFilterGroupRelation_entity/entityfields/inboxfiltergroup_id/displayValueProcess.js</displayValueProcess>
<onValidation>%aditoprj%/entity/InboxFilterGroupRelation_entity/entityfields/inboxfiltergroup_id/onValidation.js</onValidation>
</entityField>
<entityField>
<name>INBOX_ID</name>
......@@ -78,7 +80,6 @@
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>INBOXFILTERGROUP_ID.displayValue</name>
<expression>%aditoprj%/entity/InboxFilterGroupRelation_entity/recordcontainers/db/recordfieldmappings/inboxfiltergroup_id.displayvalue/expression.js</expression>
</dbRecordFieldMapping>
</recordFieldMappings>
<linkInformation>
......
import("system.vars");
import("system.result");
import("Sql_lib");
result.string(newSelect("NAME")
.from("INBOXFILTERGROUP")
.where("INBOXFILTERGROUPID = INBOXFILTERGROUP_ID").toString());
\ No newline at end of file
.where("INBOXFILTERGROUP.INBOXFILTERGROUPID", vars.get("$field.INBOXFILTERGROUP_ID")).cell());
\ No newline at end of file
import("system.neon");
import("system.translate");
import("system.result");
import("system.vars");
import("Sql_lib");
var sql = new SqlBuilder()
.selectCount("INBOXFILTERGROUP_ID")
.from("INBOXFILTERGROUP_RELATION")
.where("INBOXFILTERGROUP_RELATION.INBOXFILTERGROUP_ID", vars.get("$field.INBOXFILTERGROUP_ID"))
.cell();
if (sql > 0)
{
result.string(translate.text("Rulegroup already selected") + ".");
}
import("system.result");
import("system.vars");
import("Sql_lib");
var sql = new SqlBuilder()
.select("INBOXFILTERGROUP_RELATION.INBOXFILTERGROUP_ID")
.from("INBOXFILTERGROUP_RELATION")
.where("INBOX_ID", vars.get("$param.InboxId_param"))
.arrayColumn();
result.object(sql);
\ No newline at end of file
.where("INBOXFILTERGROUP_RELATION.INBOX_ID", vars.get("$param.InboxId_param"))
.arrayColumn();
result.object(sql);
......@@ -26,6 +26,7 @@
<name>NAME</name>
<title>Name</title>
<mandatory v="true" />
<onValidation>%aditoprj%/entity/InboxFilterGroup_entity/entityfields/name/onValidation.js</onValidation>
</entityField>
<entityField>
<name>DATE</name>
......@@ -75,6 +76,9 @@
<name>PRIORITY</name>
<title>Priority</title>
<contentType>NUMBER</contentType>
<maxValue v="9999" />
<minValue v="1" />
<inputFormat>#</inputFormat>
<onValidation>%aditoprj%/entity/InboxFilterGroup_entity/entityfields/priority/onValidation.js</onValidation>
</entityField>
<entityProvider>
......
import("system.neon");
import("system.translate");
import("system.result");
import("system.vars");
import("Sql_lib");
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
{
var sql = new SqlBuilder()
.selectCount("NAME")
.from("INBOXFILTERGROUP")
.where("INBOXFILTERGROUP.NAME", vars.get("$field.NAME"))
.cell();
if (sql > 0)
{
result.string(translate.text("Name has to be unique") + ".");
}
}
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