diff --git a/entity/Attribute_entity/Attribute_entity.aod b/entity/Attribute_entity/Attribute_entity.aod index d1aee4e2e47ea193237016189b59ba7b0ba05d24..18c70a7e7691b5868cfee056de54169feb2d62e3 100644 --- a/entity/Attribute_entity/Attribute_entity.aod +++ b/entity/Attribute_entity/Attribute_entity.aod @@ -138,6 +138,12 @@ <fieldName>SpecificAttribute</fieldName> <isConsumer v="false" /> </entityDependency> + <entityDependency> + <name>6bc87a7f-02f1-4cab-8c98-b89b626b59bd</name> + <entityName>Salesproject_entity</entityName> + <fieldName>ProjectTypeAttribute</fieldName> + <isConsumer v="false" /> + </entityDependency> </dependencies> <children> <entityParameter> @@ -153,18 +159,6 @@ <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/specificattribute/children/displaysimplename_param/valueProcess.js</valueProcess> <expose v="false" /> </entityParameter> - <entityParameter> - <name>AttrParentId_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>AttrParentType_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>GetGroups_param</name> - <expose v="false" /> - </entityParameter> <entityParameter> <name>ChildId_param</name> <expose v="false" /> diff --git a/entity/Organisation_entity/recordcontainers/index/query.js b/entity/Organisation_entity/recordcontainers/index/query.js index 0dc0d189783c15cce32f20b5fcd9af87a596d18f..eeb55badd15ac127cc5f9a7c8ea8b64d3d374a65 100644 --- a/entity/Organisation_entity/recordcontainers/index/query.js +++ b/entity/Organisation_entity/recordcontainers/index/query.js @@ -15,7 +15,7 @@ You may want to check out if your change affects other modules. However adding m var sqlQuery, sqlHelper, queryCondition, affectedIds; var CommMediumPhoneIds = db.array( db.COLUMN, "select KEYID from AB_KEYWORD_ENTRY join ab_keyword_attributerelation on AB_KEYWORD_ENTRYID = AB_KEYWORD_ENTRY_ID " + " join ab_keyword_attribute on AB_KEYWORD_ATTRIBUTEID = AB_KEYWORD_ATTRIBUTE_ID and CHAR_VALUE = 'TELEPHONE' and AB_KEYWORD_ATTRIBUTE.CONTAINER = 'CommunicationMedium'"); -var sqlHelper = new SqlMaskingUtils(); +sqlHelper = new SqlMaskingUtils(); var querySelect = newSelect("CONTACT.CONTACTID " + ", " + sqlHelper.concat(["ORGANISATION.NAME", "'|'", "ORGANISATION.CUSTOMERCODE"]) + ", " + sqlHelper.concat([ diff --git a/entity/PermissionOverview_entity/recordcontainers/jdito/contentProcess.js b/entity/PermissionOverview_entity/recordcontainers/jdito/contentProcess.js index 39b14cfbd67d78b59727d8884f8dc88fea847aea..4e241b518642c426cea40b546bd70f4f2557453a 100644 --- a/entity/PermissionOverview_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/PermissionOverview_entity/recordcontainers/jdito/contentProcess.js @@ -69,14 +69,14 @@ for each (var entry in rolesOrEntities) { // entry contains either a role or an if (entityPermSetId) { - var recordPermSetId = new SqlBuilder(alias) + recordPermSetId = new SqlBuilder(alias) .select("ASYS_PERMISSIONSETID") .from("ASYS_PERMISSIONSET") .where("ASYS_PERMISSIONSET.ASYS_PERMISSIONSET_ID", entityPermSetId) .and("ACCESSTYPE = 'R'") .arrayColumn(); - var currOverview = [entityPermSetId, entry, "VAADIN:CLOSE", "VAADIN:CLOSE", "VAADIN:CLOSE", "VAADIN:CLOSE", "VAADIN:CLOSE"]; + currOverview = [entityPermSetId, entry, "VAADIN:CLOSE", "VAADIN:CLOSE", "VAADIN:CLOSE", "VAADIN:CLOSE", "VAADIN:CLOSE"]; // default entity permissions currOverview = prepareOverview(entityPermSetId, currOverview, "default"); diff --git a/entity/Person_entity/recordcontainers/index/query.js b/entity/Person_entity/recordcontainers/index/query.js index d3029e1734d0ec926fbe2436ab5ff253cc66c157..0dec5a18db4765f1048cb5184a9c907ee7f91ef3 100644 --- a/entity/Person_entity/recordcontainers/index/query.js +++ b/entity/Person_entity/recordcontainers/index/query.js @@ -15,7 +15,7 @@ You may want to check out if your change affects other modules. However adding m var sqlQuery, sqlHelper, queryCondition, affectedIds; var CommMediumPhoneIds = db.array( db.COLUMN, "select KEYID from AB_KEYWORD_ENTRY join ab_keyword_attributerelation on AB_KEYWORD_ENTRYID = AB_KEYWORD_ENTRY_ID " + " join ab_keyword_attribute on AB_KEYWORD_ATTRIBUTEID = AB_KEYWORD_ATTRIBUTE_ID and CHAR_VALUE = 'TELEPHONE' and AB_KEYWORD_ATTRIBUTE.CONTAINER = 'CommunicationMedium'"); -var sqlHelper = new SqlMaskingUtils(); +sqlHelper = new SqlMaskingUtils(); var querySelect = newSelect("CONTACT.CONTACTID " + "," + sqlHelper.concat(["PERSON.SALUTATION", "PERSON.FIRSTNAME", "PERSON.LASTNAME", "'|'", "ORGANISATION.NAME"]) + "," + sqlHelper.concat([ @@ -48,8 +48,9 @@ var querySelect = newSelect("CONTACT.CONTACTID " .leftJoin("COMMUNICATION", "PHONE.CONTACT_ID = CONTACT.CONTACTID and PHONE.MEDIUM_ID in ('" + CommMediumPhoneIds.join("', '") + "')", "PHONE") //TODO: refactor to new SqlBuilder .orderBy("CONTACT.CONTACTID"); -if (vars.exists("$local.idvalue")) { - var affectedIds = vars.get("$local.idvalue"); +if (vars.exists("$local.idvalue")) +{ + affectedIds = vars.get("$local.idvalue"); querySelect.whereIfSet("CONTACT.CONTACTID", affectedIds, SqlBuilder.IN()); } diff --git a/entity/Salesproject_entity/Salesproject_entity.aod b/entity/Salesproject_entity/Salesproject_entity.aod index 783baa64fc549a0a8b820dca5f8c5e3c41182b52..c489c9b5d7b3950899a8aea8798523da302abc6d 100644 --- a/entity/Salesproject_entity/Salesproject_entity.aod +++ b/entity/Salesproject_entity/Salesproject_entity.aod @@ -705,19 +705,13 @@ <name>ProjectTypeAttribute</name> <dependency> <name>dependency</name> + <entityName>Attribute_entity</entityName> + <fieldName>SpecificAttribute</fieldName> </dependency> <children> <entityParameter> - <name>AttrParentId_param</name> - <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/projecttypeattribute/children/attrparentid_param/valueProcess.js</valueProcess> - </entityParameter> - <entityParameter> - <name>AttrParentType_param</name> - <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/projecttypeattribute/children/attrparenttype_param/valueProcess.js</valueProcess> - </entityParameter> - <entityParameter> - <name>DisplaySimpleName_param</name> - <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/projecttypeattribute/children/displaysimplename_param/valueProcess.js</valueProcess> + <name>ObjectType_param</name> + <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/projecttypeattribute/children/objecttype_param/valueProcess.js</valueProcess> </entityParameter> </children> </entityConsumer> diff --git a/entity/Salesproject_entity/entityfields/projecttypeattribute/children/attrparentid_param/valueProcess.js b/entity/Salesproject_entity/entityfields/projecttypeattribute/children/attrparentid_param/valueProcess.js deleted file mode 100644 index ced111e47d6e67cf16c54610df4b5eb6b893961a..0000000000000000000000000000000000000000 --- a/entity/Salesproject_entity/entityfields/projecttypeattribute/children/attrparentid_param/valueProcess.js +++ /dev/null @@ -1,4 +0,0 @@ -import("AttributeRegistry_basic"); -import("system.result"); - -result.string($AttributeRegistry.salesprojectType()); \ No newline at end of file diff --git a/entity/Salesproject_entity/entityfields/projecttypeattribute/children/attrparenttype_param/valueProcess.js b/entity/Salesproject_entity/entityfields/projecttypeattribute/children/attrparenttype_param/valueProcess.js deleted file mode 100644 index 97b98b26c19e74c78dd2ac78e9bb20a812fbf5e3..0000000000000000000000000000000000000000 --- a/entity/Salesproject_entity/entityfields/projecttypeattribute/children/attrparenttype_param/valueProcess.js +++ /dev/null @@ -1,3 +0,0 @@ -import("system.result"); -import("Attribute_lib"); -result.string($AttributeTypes.COMBO); \ No newline at end of file diff --git a/entity/Salesproject_entity/entityfields/projecttypeattribute/children/displaysimplename_param/valueProcess.js b/entity/Salesproject_entity/entityfields/projecttypeattribute/children/displaysimplename_param/valueProcess.js deleted file mode 100644 index 40effa0178464da0c7850912345f19c7fa95975a..0000000000000000000000000000000000000000 --- a/entity/Salesproject_entity/entityfields/projecttypeattribute/children/displaysimplename_param/valueProcess.js +++ /dev/null @@ -1,3 +0,0 @@ -import("system.result"); - -result.string(true); \ No newline at end of file diff --git a/entity/Salesproject_entity/entityfields/projecttypeattribute/children/objecttype_param/valueProcess.js b/entity/Salesproject_entity/entityfields/projecttypeattribute/children/objecttype_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..cc6924394ae950c43386275dda2c8db5d7a9c0ed --- /dev/null +++ b/entity/Salesproject_entity/entityfields/projecttypeattribute/children/objecttype_param/valueProcess.js @@ -0,0 +1,4 @@ +import("Context_lib"); +import("system.result"); + +result.string(ContextUtils.getCurrentContextId()); \ No newline at end of file diff --git a/process/DuplicateScanner_lib/process.js b/process/DuplicateScanner_lib/process.js index 77c30a69d55e093f2d256d05237c34f775528824..87ce6b89fc9de4aab34fee6cf6992eb85904ad5f 100644 --- a/process/DuplicateScanner_lib/process.js +++ b/process/DuplicateScanner_lib/process.js @@ -319,8 +319,9 @@ DuplicateScannerUtils.RebuildDuplicatesCache = function(pFilterName, pTargetEnti foundDuplicateIds = DuplicateScannerUtils.ScanRecords(pTargetEntity, targetRecords, entityFieldConfigs, resultFields, useExternalWebservice, pFormatValuesConsumeWebserviceCallback, alreadyIdentifiedIds, indexPattern, entityIdField); - - alreadyIdentifiedIds = alreadyIdentifiedIds.concat(foundDuplicateIds); + + if (foundDuplicateIds) + alreadyIdentifiedIds = alreadyIdentifiedIds.concat(foundDuplicateIds); if(targetRecords.length < pRecordsBlockSize) { @@ -341,7 +342,7 @@ DuplicateScannerUtils.ScanRecords = function(pTargetEntity, pTargetRecordsData, //If the contact id loading query has no results, stop. //No ids should be deleted if an error has been made in this query. if(pTargetRecordsData.length <= 0) - return; + return null; //First it gets checked if the current id has already been identified. If that's the case it'll continue with the next. //Otherwise an object gets build in the form of ["FilterFieldName" = "FilterFieldValueFromQuery"] with which a scan for possible duplicates get's started diff --git a/process/Sql_lib/process.js b/process/Sql_lib/process.js index dae14d849ac2906defcece7a9560f004f40291ab..52de2eaf809c7a6fc0bb20b2b00a415f71d3407a 100644 --- a/process/Sql_lib/process.js +++ b/process/Sql_lib/process.js @@ -2846,9 +2846,7 @@ SqlMaskingUtils.prototype.cast = function(field, targetDatatype, targetLength) { case SQLTYPES.VARCHAR: sqlDataType = _mapDefaults(targetDatatype); break; - case db.DBTYPE_FIREBIRD250: //TODO: firebird support? - break; } if (sqlDataType == undefined) { @@ -2859,7 +2857,7 @@ SqlMaskingUtils.prototype.cast = function(field, targetDatatype, targetLength) { targetLength = ""; else if(targetLength != "") { - if(typeof(targetLength == "object") && (targetLength instanceof Array)) + if(Array.isArray(targetLength)) targetLength = "(" + targetLength.join(", ") + ")"; else targetLength = "(" + targetLength + ")";