Skip to content
Snippets Groups Projects
Commit 34778f61 authored by Sebastian Listl's avatar Sebastian Listl :speech_balloon:
Browse files

Merge branch 'master' into '2021.1'

Master

See merge request xrm/basic!931
parents fcbe9cd7 fa81d2ee
No related branches found
No related tags found
No related merge requests found
Showing
with 594 additions and 604 deletions
......@@ -21,7 +21,6 @@
<include file="generatedData/classificationscore.xml" relativeToChangelogFile="true"/>
<include file="generatedData/classificationstorage.xml" relativeToChangelogFile="true"/>
<include file="generatedData/classificationtype.xml" relativeToChangelogFile="true"/>
<include file="generatedData/commrestriction.xml" relativeToChangelogFile="true"/>
<include file="generatedData/communication.xml" relativeToChangelogFile="true"/>
<include file="generatedData/contact.xml" relativeToChangelogFile="true"/>
<include file="generatedData/contract.xml" relativeToChangelogFile="true"/>
......
This diff is collapsed.
......@@ -23,6 +23,7 @@
<consumer>Contacts</consumer>
<linkedContextProcess>%aditoprj%/entity/BulkMailRecipient_entity/entityfields/contact_id/linkedContextProcess.js</linkedContextProcess>
<mandatory v="true" />
<onValueChange>%aditoprj%/entity/BulkMailRecipient_entity/entityfields/contact_id/onValueChange.js</onValueChange>
<onValidation>%aditoprj%/entity/BulkMailRecipient_entity/entityfields/contact_id/onValidation.js</onValidation>
</entityField>
<entityField>
......
import("Communication_lib");
import("system.neon");
import("system.vars");
var contactId = vars.get("$local.value");
if(contactId != "")
{
neon.setFieldValue("$field.EMAIL_ADDRESS",CommUtil.getStandardMail(contactId));
}
\ No newline at end of file
......@@ -3,6 +3,7 @@
<name>DuplicateOrganisation_entity</name>
<title>Duplicate</title>
<majorModelMode>DISTRIBUTED</majorModelMode>
<documentation>%aditoprj%/entity/DuplicateOrganisation_entity/documentation.adoc</documentation>
<grantCreate v="false" />
<grantUpdate v="false" />
<grantDelete v="false" />
......
= DuplicateOrganisation_entity
== Overview
Shows the duplicates of a record.
The views are only referenced in the OrganisationMain_view.
This entity is used to show all duplicates of an organisation, merge duplicates to one record and to ignore duplicates.
==== Actions
* ignoreDuplicates: The selected record is marked as no duplicate.
* mergeselectedintocurrent: The selected record will be merged into the current opened one.
* mergecurrentintoselected: Same behavior as with the mergeselectedintocurrent action only the other way.
== AID
More information on duplicates can be found in the AID60 or in the documentation of the DuplicateScanner_entity
\ No newline at end of file
......@@ -3,6 +3,7 @@
<name>DuplicatePerson_entity</name>
<title>Duplicate</title>
<majorModelMode>DISTRIBUTED</majorModelMode>
<documentation>%aditoprj%/entity/DuplicatePerson_entity/documentation.adoc</documentation>
<grantCreate v="false" />
<grantUpdate v="false" />
<grantDelete v="false" />
......
= DuplicateOrganisation_entity
== Overview
Shows the duplicates of a record.
The views are only referenced in the PersonMain_view.
This entity is used to show all duplicates of a person, merge duplicates to one record and to ignore duplicates.
==== Actions
* ignoreDuplicates: The selected record is marked as no duplicate.
* mergeselectedintocurrent: The selected record will be merged into the current opened one.
* mergecurrentintoselected: Same behavior as with the mergeselectedintocurrent action only the other way.
== AID
More information on duplicates can be found in the AID60 or in the documentation of the DuplicateScanner_entity
......@@ -97,7 +97,6 @@
<name>DBRecordContainer</name>
<onDBInsert>%aditoprj%/entity/DuplicateScanner_entity/recordcontainers/dbrecordcontainer/onDBInsert.js</onDBInsert>
<onDBUpdate>%aditoprj%/entity/DuplicateScanner_entity/recordcontainers/dbrecordcontainer/onDBUpdate.js</onDBUpdate>
<onDBDelete>%aditoprj%/entity/DuplicateScanner_entity/recordcontainers/dbrecordcontainer/onDBDelete.js</onDBDelete>
<alias>Data_alias</alias>
<recordFieldMappings>
<dbRecordFieldMapping>
......
=DuplicateScanner_entity
= DuplicateScanner_entity
A "DuplicateScanner" is a definition
- WHICH objects may be searched for duplicates
- and HOW these are searched
== Overview
The duplicate scanner is the configuration for duplicate recognition.
It defines WHICH objects may be searched for duplicates and HOW these are searched.
Speaking of this, the duplicate scanner is the configuration for duplicate recognition.
== Technical details
The filter is a field with contentType: FILTER_TREE which is loaded in the onInsert/onUpdate of the db recordcontainer.
All records in the DuplicateScanner cannot be deleted/created
and should be created via liquibase scripts, during the implementation of the duplicates for a new entity. Note that, the provider and the entity must be set in the filter.
The field EXTERNAL_SERVICE_USAGE_ALLOWED is deprecated and is not used in the implementation as of 06 May 2021.
The field FILTER_NAME is only used as displayName in the UI and is irrelevant for the duplicate search.
SCAN_PATTERN defines the filter. Note that, the provider of the ENTITY_TO_SCAN_NAME must use an index recordContainer.
ID_FIELD_NAME the uid field for the duplicate search. Note that currently, it must be the uid field of the entity.
==== Actions
* rebuild: rebuilds all duplicates see rebuildDuplicates_serverProcess.
* viewDuplicates: opens the target entity with default duplicate filter.
== AID
Further information and how to implement custom duplicate functionality can be found in AID60 Duplicates
......@@ -296,6 +296,12 @@
<name>itemInsertStatements</name>
<documentation>%aditoprj%/entity/Offeritem_entity/entityfields/iteminsertstatements/documentation.adoc</documentation>
</entityField>
<entityField>
<name>currency</name>
<title>Currency</title>
<state>READONLY</state>
<valueProcess>%aditoprj%/entity/Offeritem_entity/entityfields/currency/valueProcess.js</valueProcess>
</entityField>
</entityFields>
<recordContainers>
<dbRecordContainer>
......
import("KeywordRegistry_basic");
import("Keyword_lib");
import("system.result");
import("system.neon");
import("system.vars");
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT)
{
if(vars.get("$param.Currency_param") && vars.get("$param.Currency_param") != "")
{
result.string(KeywordUtils.getViewValue($KeywordRegistry.currency(), vars.getString("$param.Currency_param")));
}
}
\ No newline at end of file
......@@ -282,6 +282,12 @@
<name>itemInsertStatements</name>
<documentation>%aditoprj%/entity/Orderitem_entity/entityfields/iteminsertstatements/documentation.adoc</documentation>
</entityField>
<entityField>
<name>currency</name>
<title>Currency</title>
<state>READONLY</state>
<valueProcess>%aditoprj%/entity/Orderitem_entity/entityfields/currency/valueProcess.js</valueProcess>
</entityField>
</entityFields>
<recordContainers>
<dbRecordContainer>
......
import("KeywordRegistry_basic");
import("Keyword_lib");
import("system.result");
import("system.neon");
import("system.vars");
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT)
{
if(vars.get("$param.Currency_param") && vars.get("$param.Currency_param") != "")
{
result.string(KeywordUtils.getViewValue($KeywordRegistry.currency(), vars.getString("$param.Currency_param")));
}
}
\ No newline at end of file
......@@ -25,10 +25,10 @@ if(pId != "" && vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
var partsListObject = oiUtils.insertPartsList(pId, vars.get("$field.SALESORDERITEMID"), curr, contactid, quantity, true, vars.get("$field.SALESORDER_ID"), sumUpTop);
neon.setFieldValue("$field.itemInsertStatements", JSON.stringify(partsListObject["partsList"]));
if(sumUpTop)//only sum-up this price if there is no valid Price
if(sumUpTop && partsListObject["topProductInfo"])//only sum-up this price if there is no valid Price
{
neon.setFieldValue("$field.PRICE", partsListObject["topProductInfo"]["price"]*quantity);
neon.setFieldValue("$field.VAT", partsListObject["topProductInfo"]["vat"]);
neon.setFieldValue("$field.PRICE", partsListObject["topProductInfo"]["price"]*quantity);
neon.setFieldValue("$field.VAT", partsListObject["topProductInfo"]["vat"]);
}
}
......@@ -4,6 +4,14 @@ import("system.result");
import("system.vars");
import("Product_lib");
var price = ProductUtils.getCurrentProductPrice(vars.get("$field.PRODUCTID"), "PP", true);
var currency;
if(vars.get("$param.OrderOfferInformations_param"))
{
currency = JSON.parse(vars.get("$param.OrderOfferInformations_param")).Currency_param;
}
var price = ProductUtils.getCurrentProductPrice(vars.get("$field.PRODUCTID"), "PP", true, currency);
if (price.length > 0)
result.string(text.formatDouble(price[0], "#,##0.00", true) + " " + price[1]);
\ No newline at end of file
{
result.string(text.formatDouble(price[0], "#,##0.00", true) + " " + price[1]);
}
\ No newline at end of file
......@@ -4,6 +4,14 @@ import("system.result");
import("system.vars");
import("Product_lib");
var price = ProductUtils.getCurrentProductPrice(vars.get("$field.PRODUCTID"), "SP", true);
var currency;
if(vars.get("$param.OrderOfferInformations_param"))
{
currency = JSON.parse(vars.get("$param.OrderOfferInformations_param")).Currency_param;
}
var price = ProductUtils.getCurrentProductPrice(vars.get("$field.PRODUCTID"), "SP", true, currency);
if (price.length > 0)
result.string(text.formatDouble(price[0], "#,##0.00", true) + " " + price[1]);
\ No newline at end of file
{
result.string(text.formatDouble(price[0], "#,##0.00", true) + " " + price[1]);
}
\ No newline at end of file
......@@ -80,9 +80,5 @@
<name>407d9b32-c379-428b-b1e1-d92a820971fd</name>
<view>SalesprojectPreviewMultiple_view</view>
</neonViewReference>
<neonViewReference>
<name>c860de14-8ebe-438f-92c3-cba727a15690</name>
<view>SalesprojectAttribute_view</view>
</neonViewReference>
</references>
</neonContext>
......@@ -40,6 +40,10 @@
<name>2b635ddb-d52c-4063-af11-aea8eeee151b</name>
<entityField>PRICE</entityField>
</entityFieldLink>
<entityFieldLink>
<name>fa6d99df-4f30-4737-8064-28eb5c88f17f</name>
<entityField>currency</entityField>
</entityFieldLink>
<entityFieldLink>
<name>4f339738-6358-463e-b941-3b2693ab115a</name>
<entityField>DISCOUNT</entityField>
......
......@@ -39,6 +39,10 @@
<name>f7bd09a0-ed27-4989-940e-e3baac4c3c80</name>
<entityField>PRICE</entityField>
</entityFieldLink>
<entityFieldLink>
<name>f4e3ecc2-6303-493b-aa5a-5d6b974ae9da</name>
<entityField>currency</entityField>
</entityFieldLink>
<entityFieldLink>
<name>2b38de6e-85de-479c-99fd-27ff0d2e1c33</name>
<entityField>DISCOUNT</entityField>
......
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