Skip to content
Snippets Groups Projects
Commit 23eed077 authored by Pascal Neub's avatar Pascal Neub Committed by Benjamin Ulrich
Browse files

[Projekt: xRM-Sales][TicketNr.: 1079035][Buyingcenter im VT Projekt um "Loyalität" erweitern]

parent 322c70b1
No related branches found
No related tags found
No related merge requests found
......@@ -321,6 +321,12 @@
<name>ObjectSubType_param</name>
<expose v="true" />
</entityParameter>
<entityField>
<name>PERSON_ATTR_LOYALTY</name>
<title>Loyalty</title>
<groupable v="true" />
<displayValueProcess>%aditoprj%/entity/Member_entity/entityfields/person_attr_loyalty/displayValueProcess.js</displayValueProcess>
</entityField>
</entityFields>
<recordContainers>
<dbRecordContainer>
......@@ -420,6 +426,10 @@
<recordfield>OBJECTMEMBER.ONSITE</recordfield>
<isFilterable v="true" />
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>PERSON_ATTR_LOYALTY.value</name>
<expression>%aditoprj%/entity/Member_entity/recordcontainers/db/recordfieldmappings/person_attr_loyalty.value/expression.js</expression>
</dbRecordFieldMapping>
</recordFieldMappings>
<linkInformation>
<linkInformation>
......@@ -533,6 +543,9 @@
<jDitoRecordFieldMapping>
<name>MST_MEMBERROLE.value</name>
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>PERSON_ATTR_LOYALTY.value</name>
</jDitoRecordFieldMapping>
</recordFieldMappings>
</jDitoRecordContainer>
</recordContainers>
......
import("system.vars");
import("system.translate");
import("system.result");
result.string(translate.text(vars.get("$this.value")));
import("Attribute_lib");
import("AttributeRegistry_basic");
import("Sql_lib");
import("system.result");
var attrSql = newSelect("COMBOVAL.ATTRIBUTE_NAME")
.from("AB_ATTRIBUTERELATION")
.join("AB_ATTRIBUTE", "AB_ATTRIBUTE_ID = AB_ATTRIBUTE.AB_ATTRIBUTEID")
.leftJoin("AB_ATTRIBUTE COMBOVAL", AttributeTypes.COMBO.databaseField + " = COMBOVAL.AB_ATTRIBUTEID")
.where("AB_ATTRIBUTERELATION.OBJECT_ROWID = OBJECTMEMBER.CONTACT_ID")
.and("AB_ATTRIBUTERELATION.AB_ATTRIBUTE_ID", $AttributeRegistry.loyalty());
result.string("(" + attrSql.toString() + ")");
import("AttributeRegistry_basic");
import("Util_lib");
import("system.translate");
import("system.result");
......@@ -17,7 +18,7 @@ var memberLoadingConfig = entities.createConfigForLoadingRows()
"MEMBERROLE", "MEMBERROLE.displayValue", "OBJECT_ROWID", "OBJECT_TYPE",
"OBJECTMEMBERID", "ORG_ORGID", "ORGANISATION_NAME", "PERSON_FIRSTNAME", "PERSON_FULL_NAME",
"PERSON_LASTNAME", "PERSON_PERSID", "PERSON_SALUTATION", "PERSON_TITLE", "POSITION", "TARGETCONTEXT",
"recordType", "MST_MEMBERROLE"]);
"recordType", "MST_MEMBERROLE", "PERSON_ATTR_LOYALTY"]);
if (idValues)
{
......@@ -56,7 +57,8 @@ memberRows = memberRows.map(function(row)
row["POSITION"],
row["TARGETCONTEXT"],
row["recordType"],
row["MST_MEMBERROLE"]
row["MST_MEMBERROLE"],
row["PERSON_ATTR_LOYALTY"]
];
});
......@@ -150,7 +152,11 @@ if (Utils.isNullOrEmpty(idValues) || memberRows.length === 0)
persRows[counter][7],
null,
"DistrictResponsible",
""
"",
(new AttributeRelationQuery(
row[3],
$AttributeRegistry.loyalty()
).includeDisplayValue().getSingleAttribute() || {displayValue: ""}).displayValue
]);
});
}
......
......@@ -45,6 +45,10 @@
<name>c23f4e8b-87a1-4535-b2d1-f6c97d6bfe0b</name>
<entityField>POSITION</entityField>
</neonTableColumn>
<neonTableColumn>
<name>fe949666-5fe7-42ef-acf1-748ed336682d</name>
<entityField>PERSON_ATTR_LOYALTY</entityField>
</neonTableColumn>
<neonTableColumn>
<name>bea82980-0639-405a-ab3f-92e45f97090e</name>
<entityField>MEMBERROLE</entityField>
......@@ -87,6 +91,10 @@
<name>87770e60-967b-4411-9eb3-0397fda4663e</name>
<entityField>POSITION</entityField>
</neonTreeTableColumn>
<neonTreeTableColumn>
<name>6ff9f7d4-e619-4d3b-afa2-279dc0817bfc</name>
<entityField>PERSON_ATTR_LOYALTY</entityField>
</neonTreeTableColumn>
<neonTreeTableColumn>
<name>2dc17972-2e5a-424a-b069-2b8f04b35f6c</name>
<entityField>MEMBERROLE</entityField>
......
......@@ -19,6 +19,7 @@ $AttributeRegistry.departments = function(){return "87d4ff5b-0ab6-4534-be26-76c6
$AttributeRegistry.salesprojectType = function(){return "fd3963bc-8e60-411a-9911-b97eb73e5cf7";};
$AttributeRegistry.responsibleADsupervisor = function(){return "c0b26482-c0aa-413d-a9c3-f44c56bd04a9";};
$AttributeRegistry.industry = function(){return "7e9927a4-41e4-426f-bddd-c3e9ee3b093e";};
$AttributeRegistry.loyalty = function(){return "e73ed929-8631-46de-b28f-eb1423abb808";};
$AttributeRegistry.visitPlanFrequency = function(){return "547b8b9d-88ba-4590-9e01-34d2a58116cc";};
$AttributeRegistry.visitPlanFrequency$monthly = function(){return "8c100817-1d2b-4fc7-8fdd-fd0370e19385";};
......
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