Skip to content
Snippets Groups Projects
Commit 9d0a859a authored by Pascal Neub's avatar Pascal Neub Committed by Sebastian Pongratz
Browse files

move rebuilding all to serverProcess since it will allways be executed via an...

move rebuilding all to serverProcess since it will allways be executed via an asyncronous serverProcess
parent df671c04
No related branches found
No related tags found
No related merge requests found
Showing
with 486 additions and 219 deletions
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<changeSet author="p.neub" id="082919b2-ebfd-4864-9839-89e593fb6f2d">
<dropColumn tableName="UNRELATEDDUPLICATES">
<column name="CLUSTERID"/>
</dropColumn>
<addColumn tableName="UNRELATEDDUPLICATES">
<column name="DUPLICATETYPE" type="NVARCHAR(63)"/>
</addColumn>
<createIndex indexName="IDX_UNRELATEDDUPLICATES_DUPLICATETYPE" tableName="UNRELATEDDUPLICATES">
<column name="DUPLICATETYPE"/>
</createIndex>
<createIndex indexName="IDX_UNRELATEDDUPLICATES_SOURCEDUPLICATEID" tableName="UNRELATEDDUPLICATES">
<column name="SOURCEDUPLICATEID"/>
</createIndex>
<createIndex indexName="IDX_UNRELATEDDUPLICATES" tableName="UNRELATEDDUPLICATES">
<column name="DUPLICATETYPE"/>
<column name="SOURCEDUPLICATEID"/>
<column name="UNRELATEDDUPLICATEID"/>
</createIndex>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<include relativeToChangelogFile="true" file="create_hasduplicate.xml"/>
<include relativeToChangelogFile="true" file="drop_duplicateclusters.xml"/>
<include relativeToChangelogFile="true" file="drop_duplicatescannerresultfieldconfig.xml"/>
<include relativeToChangelogFile="true" file="alter_unrelatedduplicates.xml"/>
<include relativeToChangelogFile="true" file="migrate_unrelatedduplicates.xml"/>
</databaseChangeLog>
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<changeSet author="p.neub" id="db282e4c-01c2-4b55-aa85-01306f4b1f7a">
<createTable tableName="HASDUPLICATE">
<column name="HASDUPLICATEID" type="CHAR(36)">
<constraints primaryKey="true" primaryKeyName="PK_HASDUPLICATE_HASDUPLICATEID"></constraints>
</column>
<column name="OBJECT_TYPE" type="NVARCHAR(63)"/>
<column name="OBJECT_ROWID" type="CHAR(36)"/>
<column name="DUPLICATECOUNT" type="INTEGER"/>
</createTable>
<createIndex indexName="IDX_HASDUPLICATE" tableName="HASDUPLICATE">
<column name="OBJECT_TYPE"/>
<column name="OBJECT_ROWID"/>
</createIndex>
<createIndex indexName="IDX_HASDUPLICATE_OBJECT_ROWID" tableName="HASDUPLICATE">
<column name="OBJECT_ROWID"/>
</createIndex>
</changeSet>
</databaseChangeLog>
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<changeSet author="p.neub" id="45db014f-922d-4619-b69f-9bf3a36285f4">
<dropTable tableName="DUPLICATECLUSTERS"/>
</changeSet>
</databaseChangeLog>
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<changeSet author="p.neub" id="fcf592c4-e07c-4919-bfba-0bf99db161ec">
<dropTable tableName="DUPLICATESCANNERRESULTFIELDCONFIG"/>
</changeSet>
</databaseChangeLog>
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<changeSet author="p.neub" id="587e1ed7-b7c8-46f0-9058-01521ed97fd5">
<update tableName="UNRELATEDDUPLICATES">
<column name="DUPLICATETYPE" value="Person_entity"/>
<where>
DUPLICATETYPE is null and
(select PERSON_ID from CONTACT where CONTACTID = SOURCEDUPLICATEID)
is not null
</where>
</update>
<update tableName="UNRELATEDDUPLICATES">
<column name="DUPLICATETYPE" value="Organisation_entity"/>
<where>
DUPLICATETYPE is null and
(select PERSON_ID from CONTACT where CONTACTID = SOURCEDUPLICATEID)
is null
</where>
</update>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
......@@ -9,4 +9,5 @@
<include relativeToChangelogFile="true" file="Checklists/changelog.xml"/>
<include relativeToChangelogFile="true" file="Planning/changelog.xml"/>
<include relativeToChangelogFile="true" file="alter_origin_attribute.xml"/>
<include relativeToChangelogFile="true" file="Duplicate/changelog.xml"/>
</databaseChangeLog>
\ No newline at end of file
......@@ -12176,82 +12176,6 @@
</entityFieldDb>
</entityFields>
</entityDb>
<entityDb>
<name>DUPLICATECLUSTERS</name>
<dbName></dbName>
<idColumn>ID</idColumn>
<idGeneratorType v="0" />
<idGeneratorInterval v="1" />
<documentation></documentation>
<title></title>
<description></description>
<auditSyncConfig>
<name>auditSyncConfig</name>
<auditMode v="0" />
<syncActive v="false" />
<syncComplete v="true" />
<syncDirection v="1" />
<syncIds></syncIds>
</auditSyncConfig>
<entityFields>
<entityFieldDb>
<name>DUPLICATEID</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="1" />
<size v="36" />
<scale v="0" />
<notNull v="true" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>CLUSTERID</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="1" />
<size v="36" />
<scale v="0" />
<notNull v="true" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>ID</name>
<dbName></dbName>
<primaryKey v="true" />
<columnType v="1" />
<size v="36" />
<scale v="0" />
<notNull v="true" />
<isUnique v="true" />
<index v="true" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>TARGET_ENTITY</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="12" />
<size v="200" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
</entityFields>
</entityDb>
<entityDb>
<name>UNRELATEDDUPLICATES</name>
<dbName></dbName>
......@@ -12313,136 +12237,11 @@
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>CLUSTERID</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="1" />
<size v="36" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
</entityFields>
</entityDb>
<entityDb>
<name>DUPLICATESCANNERRESULTFIELDCONFIG</name>
<dbName></dbName>
<idColumn>ID</idColumn>
<idGeneratorType v="0" />
<idGeneratorInterval v="1" />
<documentation></documentation>
<title></title>
<description></description>
<auditSyncConfig>
<name>auditSyncConfig</name>
<auditMode v="0" />
<syncActive v="false" />
<syncComplete v="true" />
<syncDirection v="1" />
<syncIds></syncIds>
</auditSyncConfig>
<entityFields>
<entityFieldDb>
<name>DATE_EDIT</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="93" />
<size v="29" />
<scale v="9" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>DUPLICATESCANNER_ID</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="1" />
<size v="36" />
<scale v="0" />
<notNull v="true" />
<isUnique v="false" />
<index v="true" />
<documentation></documentation>
<title></title>
<description></description>
<dependencies>
<entityDependency>
<name>9b123a17-2f41-49f8-9492-f386ece46f7c</name>
<entityName>DUPLICATESCANNER</entityName>
<fieldName>ID</fieldName>
</entityDependency>
</dependencies>
</entityFieldDb>
<entityFieldDb>
<name>DATE_NEW</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="93" />
<size v="29" />
<scale v="9" />
<notNull v="true" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>ID</name>
<dbName></dbName>
<primaryKey v="true" />
<columnType v="1" />
<size v="36" />
<scale v="0" />
<notNull v="true" />
<isUnique v="true" />
<index v="true" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>USER_NEW</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="12" />
<size v="50" />
<scale v="0" />
<notNull v="true" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>ENTITY_FIELD_NAME</name>
<name>DUPLICATETYPE</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="12" />
<size v="100" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>USER_EDIT</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="12" />
<size v="50" />
<size v="63" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
......@@ -18533,6 +18332,82 @@
</entityFieldDb>
</entityFields>
</entityDb>
<entityDb>
<name>HASDUPLICATE</name>
<dbName></dbName>
<idColumn>HASDUPLICATEID</idColumn>
<idGeneratorType v="0" />
<idGeneratorInterval v="1" />
<documentation></documentation>
<title></title>
<description></description>
<auditSyncConfig>
<name>auditSyncConfig</name>
<auditMode v="0" />
<syncActive v="false" />
<syncComplete v="true" />
<syncDirection v="1" />
<syncIds></syncIds>
</auditSyncConfig>
<entityFields>
<entityFieldDb>
<name>OBJECT_ROWID</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="1" />
<size v="36" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>OBJECT_TYPE</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="12" />
<size v="63" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>DUPLICATECOUNT</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="4" />
<size v="10" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>HASDUPLICATEID</name>
<dbName></dbName>
<primaryKey v="true" />
<columnType v="1" />
<size v="36" />
<scale v="0" />
<notNull v="true" />
<isUnique v="true" />
<index v="true" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
</entityFields>
</entityDb>
<entityDb>
<name>AB_SYNCCONTACT</name>
<dbName></dbName>
......
......@@ -330,11 +330,6 @@
<kind v="10077" />
<title></title>
</entityNode>
<entityNode>
<name>Duplicates</name>
<kind v="10077" />
<title></title>
</entityNode>
<entityNode>
<name>AuditLogHistory</name>
<kind v="10077" />
......
......@@ -5,7 +5,8 @@ import("system.vars");
import("DuplicateScanner_lib");
var contactId = vars.get("$field.CONTACTID");
DuplicateScannerUtils.deleteCachedDuplicate(contactId);
DuplicateScannerUtils.deleteHasDuplicateEntries("Person_entity", [contactId]);
DuplicateScannerUtils.deleteHasDuplicateEntries("Organisation_entity", [contactId]);
new AttributeRelationQuery(contactId, null, "Person")
.deleteAllAttributes();
......
<?xml version="1.0" encoding="UTF-8"?>
<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.18" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.18">
<name>DuplicateOrganisation_entity</name>
<title>Duplicate</title>
<majorModelMode>DISTRIBUTED</majorModelMode>
<grantCreate v="false" />
<grantUpdate v="false" />
<grantDelete v="false" />
<initFilterProcess>%aditoprj%/entity/DuplicateOrganisation_entity/initFilterProcess.js</initFilterProcess>
<titlePlural>Duplicates</titlePlural>
<recordContainer>db</recordContainer>
<entityFields>
<entityProvider>
<name>#PROVIDER</name>
<targetContextField>targetContext</targetContextField>
<targetIdField>CONTACTID</targetIdField>
<dependencies>
<entityDependency>
<name>a666bb24-2875-481a-879e-86b8e8517c1e</name>
<entityName>Organisation_entity</entityName>
<fieldName>Duplicates</fieldName>
<isConsumer v="false" />
</entityDependency>
</dependencies>
</entityProvider>
<entityProvider>
<name>#PROVIDER_AGGREGATES</name>
<useAggregates v="true" />
</entityProvider>
<entityField>
<name>CONTACTID</name>
<linkedContext>Organisation</linkedContext>
</entityField>
<entityField>
<name>ORGNAME</name>
<title>Name</title>
<linkedContext>Organisation</linkedContext>
</entityField>
<entityParameter>
<name>Id_param</name>
<valueProcess>%aditoprj%/entity/DuplicateOrganisation_entity/entityfields/id_param/valueProcess.js</valueProcess>
<mandatory v="true" />
</entityParameter>
<entityParameter>
<name>Obj_param</name>
<expose v="true" />
<mandatory v="true" />
<description>Contains a name value object of all variables that can be used to scan for duplicates</description>
</entityParameter>
<entityActionGroup>
<name>filterActions</name>
<children>
<entityActionField>
<name>ignoreDuplicates</name>
<title>${IGNORE_DUPLICATE}</title>
<onActionProcess>%aditoprj%/entity/DuplicateOrganisation_entity/entityfields/filteractions/children/ignoreduplicates/onActionProcess.js</onActionProcess>
<isObjectAction v="false" />
<isSelectionAction v="true" />
<iconId>VAADIN:CLOSE</iconId>
<titleProcess>%aditoprj%/entity/DuplicateOrganisation_entity/entityfields/filteractions/children/ignoreduplicates/titleProcess.js</titleProcess>
</entityActionField>
<entityActionField>
<name>mergeselectedintocurrent</name>
<title>Integrate selected into current contact</title>
<onActionProcess>%aditoprj%/entity/DuplicateOrganisation_entity/entityfields/filteractions/children/mergeselectedintocurrent/onActionProcess.js</onActionProcess>
<isSelectionAction v="true" />
<iconId>NEON:IMPORT</iconId>
</entityActionField>
<entityActionField>
<name>mergecurrentintoselected</name>
<title>Integrate current into selected contact</title>
<onActionProcess>%aditoprj%/entity/DuplicateOrganisation_entity/entityfields/filteractions/children/mergecurrentintoselected/onActionProcess.js</onActionProcess>
<isSelectionAction v="true" />
<iconId>NEON:EXPORT</iconId>
</entityActionField>
</children>
</entityActionGroup>
<entityField>
<name>STATUS</name>
<title>Status</title>
<consumer>KeywordContactStates</consumer>
</entityField>
<entityField>
<name>CUSTOMERCODE</name>
<title>Customercode</title>
</entityField>
<entityConsumer>
<name>KeywordContactStates</name>
<dependency>
<name>dependency</name>
<entityName>KeywordEntry_entity</entityName>
<fieldName>SpecificContainerKeywords</fieldName>
</dependency>
<children>
<entityParameter>
<name>ContainerName_param</name>
<valueProcess>%aditoprj%/entity/DuplicateOrganisation_entity/entityfields/keywordcontactstates/children/containername_param/valueProcess.js</valueProcess>
</entityParameter>
</children>
</entityConsumer>
<entityField>
<name>TYPE</name>
<title>Type</title>
<consumer>KeywordOrganisationTypes</consumer>
</entityField>
<entityField>
<name>STANDARD_EMAIL_COMMUNICATION</name>
<title>E-Mail</title>
</entityField>
<entityField>
<name>STANDARD_PHONE_COMMUNICATION</name>
<title>Phone</title>
</entityField>
<entityField>
<name>STANDARD_ADDRESS</name>
<title>Address</title>
</entityField>
<entityConsumer>
<name>KeywordOrganisationTypes</name>
<dependency>
<name>dependency</name>
<entityName>KeywordEntry_entity</entityName>
<fieldName>SpecificContainerKeywords</fieldName>
</dependency>
<children>
<entityParameter>
<name>ContainerName_param</name>
<valueProcess>%aditoprj%/entity/DuplicateOrganisation_entity/entityfields/keywordorganisationtypes/children/containername_param/valueProcess.js</valueProcess>
</entityParameter>
</children>
</entityConsumer>
<entityField>
<name>targetContext</name>
<valueProcess>%aditoprj%/entity/DuplicateOrganisation_entity/entityfields/targetcontext/valueProcess.js</valueProcess>
</entityField>
<entityField>
<name>DUPLICATE</name>
<title>Duplicate</title>
<contentType>BOOLEAN</contentType>
</entityField>
<entityField>
<name>PICTURE</name>
<title>Picture</title>
<contentType>IMAGE</contentType>
<displayValueProcess>%aditoprj%/entity/DuplicateOrganisation_entity/entityfields/picture/displayValueProcess.js</displayValueProcess>
</entityField>
</entityFields>
<recordContainers>
<dbRecordContainer>
<name>db</name>
<isReadOnly v="true" />
<fromClauseProcess>%aditoprj%/entity/DuplicateOrganisation_entity/recordcontainers/db/fromClauseProcess.js</fromClauseProcess>
<conditionProcess>%aditoprj%/entity/DuplicateOrganisation_entity/recordcontainers/db/conditionProcess.js</conditionProcess>
<alias>Data_alias</alias>
<recordFieldMappings>
<dbRecordFieldMapping>
<name>CONTACTID.value</name>
<recordfield>CONTACT.CONTACTID</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>ORGNAME.value</name>
<recordfield>CONTACT.CONTACTID</recordfield>
<isFilterable v="true" />
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>ORGNAME.displayValue</name>
<recordfield>ORGANISATION.NAME</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>CUSTOMERCODE.value</name>
<recordfield>ORGANISATION.CUSTOMERCODE</recordfield>
<isFilterable v="true" />
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>STATUS.value</name>
<recordfield>CONTACT.STATUS</recordfield>
<isFilterable v="true" />
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>STATUS.displayValue</name>
<expression>%aditoprj%/entity/DuplicateOrganisation_entity/recordcontainers/db/recordfieldmappings/status.displayvalue/expression.js</expression>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>STANDARD_EMAIL_COMMUNICATION.value</name>
<expression>%aditoprj%/entity/DuplicateOrganisation_entity/recordcontainers/db/recordfieldmappings/standard_email_communication.value/expression.js</expression>
<isFilterable v="true" />
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>STANDARD_PHONE_COMMUNICATION.value</name>
<expression>%aditoprj%/entity/DuplicateOrganisation_entity/recordcontainers/db/recordfieldmappings/standard_phone_communication.value/expression.js</expression>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>STANDARD_ADDRESS.value</name>
<recordfield>ADDRESS.ADDRESS</recordfield>
<isFilterable v="true" />
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>TYPE.value</name>
<recordfield>ORGANISATION.KIND</recordfield>
<isFilterable v="true" />
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>TYPE.displayValue</name>
<expression>%aditoprj%/entity/DuplicateOrganisation_entity/recordcontainers/db/recordfieldmappings/type.displayvalue/expression.js</expression>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>DUPLICATE.value</name>
<expression>%aditoprj%/entity/DuplicateOrganisation_entity/recordcontainers/db/recordfieldmappings/duplicate.value/expression.js</expression>
<isFilterable v="true" />
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>PICTURE.value</name>
<recordfield>ORGANISATION.PICTURE</recordfield>
</dbRecordFieldMapping>
</recordFieldMappings>
<linkInformation>
<linkInformation>
<name>49ea0faa-d04e-4d9d-b489-5a7b815e9e89</name>
<tableName>ORGANISATION</tableName>
<primaryKey>ORGANISATIONID</primaryKey>
<isUIDTable v="false" />
<readonly v="true" />
</linkInformation>
<linkInformation>
<name>523f6891-14ee-49ba-952d-7d5981e14b0c</name>
<tableName>CONTACT</tableName>
<primaryKey>CONTACTID</primaryKey>
<isUIDTable v="true" />
<readonly v="true" />
</linkInformation>
<linkInformation>
<name>6b73b998-a194-4fb6-8659-42eac09e20cc</name>
<tableName>ADDRESS</tableName>
<primaryKey>ADDRESSID</primaryKey>
<isUIDTable v="false" />
<readonly v="true" />
</linkInformation>
</linkInformation>
</dbRecordContainer>
</recordContainers>
</entity>
import("system.neon");
import("system.vars");
import("system.result");
import("DuplicateScanner_lib");
DuplicateScannerUtils.updateIgnored("Organisation_entity", vars.get("$param.Id_param"), vars.get("$sys.selection"), parseInt(vars.get("$field.DUPLICATE")));
neon.refreshAll(); // Update the rows, because UNRELATEDDUPLICATES wont trigger a refresh even with write entities
import("system.translate");
import("system.vars");
import("system.result");
result.string(
parseInt(vars.get("$field.DUPLICATE")) ?
translate.text("${IGNORE_DUPLICATE}") :
translate.text("${UNIGNORE_DUPLICATE}")
);
import("system.translate");
import("system.question");
import("Employee_lib");
import("system.vars");
import("system.neon");
import("DuplicateScanner_lib");
import("DuplicateMerge_lib");
let sourceContactId = vars.get("$param.DuplicateCurrentContactId_param");
if(vars.get("$sys.selection").length == 1)
{
let sourceContactId = vars.get("$param.Id_param");
let targetContactId = vars.get("$sys.selection")[0];
//todo the actual merge ought to happen in a separate view where the contact infos can be merged manually by the user.
let mergeSuccess = DuplicateScannerUtils.mergeOrganisation(sourceContactId, targetContactId);
let mergeSuccess = DuplicateMergeUtils.mergeOrganisation(sourceContactId, targetContactId);
if(mergeSuccess)
{
let currentContactId = EmployeeUtils.getCurrentContactId();
if(currentContactId == null)
currentContactId = "";
DuplicateScannerUtils.createMergeSuccessActivity(sourceContactId, targetContactId, currentContactId, "Organisation");
DuplicateMergeUtils.createMergeSuccessActivity(sourceContactId, targetContactId, currentContactId, "Organisation");
neon.openContext("Organisation", "OrganisationMain_view", [targetContactId], neon.OPERATINGSTATE_VIEW, null)
}
\ No newline at end of file
}
}
else
{
question.showMessage(translate.text("Please select only one element"));
}
import("system.translate");
import("system.question");
import("Employee_lib");
import("system.vars");
import("system.neon");
import("DuplicateScanner_lib");
import("DuplicateMerge_lib");
let targetContactId = vars.get("$param.DuplicateCurrentContactId_param");
if(vars.get("$sys.selection").length == 1)
{
let targetContactId = vars.get("$param.Id_param");
let sourceContactId = vars.get("$sys.selection")[0];
//todo the actual merge ought to happen in a separate view where the contact infos can be merged manually by the user.
let mergeSuccess = DuplicateScannerUtils.mergeOrganisation(sourceContactId, targetContactId);
let mergeSuccess = DuplicateMergeUtils.mergeOrganisation(sourceContactId, targetContactId);
if(mergeSuccess)
{
let currentContactId = EmployeeUtils.getCurrentContactId();
if(currentContactId == null)
currentContactId = "";
DuplicateScannerUtils.createMergeSuccessActivity(sourceContactId, targetContactId, currentContactId, "Organisation");
DuplicateMergeUtils.createMergeSuccessActivity(sourceContactId, targetContactId, currentContactId, "Organisation");
//neon.refresh() with no fields will refresh the current image (and all sub images) but NOT the preview. neon.refreshAll() would refresh both,
//why it would lead to an error because it's trying to load the already opened preview of the duplicateContact which just got deleted
//and does not exist any more which results in an exception
neon.refresh();
}
\ No newline at end of file
}
}
else
{
question.showMessage(translate.text("Please select only one element"));
}
import("system.vars");
import("system.result");
import("system.vars");
result.string("Person_entity");
\ No newline at end of file
var jsonObj = JSON.parse(vars.get("$param.Obj_param"));
result.string(jsonObj["CONTACTID"]);
import("system.result");
import("Keyword_lib");
import("KeywordRegistry_basic");
result.string($KeywordRegistry.contactStatus());
import("system.result");
import("Keyword_lib");
import("KeywordRegistry_basic");
result.string($KeywordRegistry.organisationType());
import("system.result");
import("system.vars");
if (vars.get("$field.PICTURE"))
{
result.string(vars.get("$field.PICTURE"));
}
else
{
result.string("TEXT:" + vars.getString("$field.ORGNAME.displayValue").trim());
}
import("system.result");
import("Context_lib");
result.string(ContextUtils.getContextName("Organisation"));
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