diff --git a/entity/LeadimportMappingAssistant_entity/LeadimportMappingAssistant_entity.aod b/entity/LeadimportMappingAssistant_entity/LeadimportMappingAssistant_entity.aod index 0cbf79b0ddbfcc88bc73e391734bffd8e0b04a8e..f985150a0e1cb55d7858aa3540456b609937f07d 100644 --- a/entity/LeadimportMappingAssistant_entity/LeadimportMappingAssistant_entity.aod +++ b/entity/LeadimportMappingAssistant_entity/LeadimportMappingAssistant_entity.aod @@ -14,6 +14,7 @@ <name>FIELDNAME</name> <title>Fieldname</title> <consumer>KeywordImportFields</consumer> + <mandatory v="true" /> <displayValueProcess>%aditoprj%/entity/LeadimportMappingAssistant_entity/entityfields/fieldname/displayValueProcess.js</displayValueProcess> </entityField> <entityField> @@ -26,10 +27,12 @@ <entityField> <name>INPUTVALUE</name> <title>Input value</title> + <mandatory v="true" /> </entityField> <entityField> <name>OUTPUTVALUE</name> <title>Output value</title> + <mandatory v="true" /> </entityField> <entityField> <name>USER_NEW</name> diff --git a/process/Leadimport_lib/process.js b/process/Leadimport_lib/process.js index a4201c301c22ba2d7b33777f894e829524a24d60..6feb9d42a87787895ed1b6509c7c198c39084c23 100644 --- a/process/Leadimport_lib/process.js +++ b/process/Leadimport_lib/process.js @@ -450,20 +450,16 @@ LeadImportUtils.insertAttr = function(pDataFields, pDataTypes, pFieldDef, pLeadV DataValues["OBJECT_ROWID"] = pContactId; switch(attrdata[1][1].trim())//type { - case "COMBO": - value = newSelect("AB_ATTRIBUTEID") - .from("AB_ATTRIBUTE") - .where("AB_ATTRIBUTE.ATTRIBUTE_PARENT_ID", attrdata[1][0]) - .and("AB_ATTRIBUTE.ATTRIBUTE_NAME", value) - .cell(); - - type = "ID_VALUE"; + case AttributeTypes.COMBO(): + value = AttributeUtil.getPossibleListValues(attrdata[1][0], attrdata[1][1]).filter(function (attrbute) { return attrbute[1] == value}); + + type = AttributeTypes.COMBO.databaseField; break; //other cases can be added here } - if (value != "" && type != "") + if (value.length && type != "") { - DataValues[type] = value; + DataValues[type] = value[0][0]; LeadImportUtils.insertTable(pDataFields, pDataTypes, DataValues, "AB_ATTRIBUTERELATION", pUser, pDate); } } @@ -591,7 +587,7 @@ LeadImportUtils.insertOrg = function(pDataFields, pDataTypes, pFieldDef, pField */ LeadImportUtils.insertPers = function(pDataFields, pDataTypes, pFieldDef, pFieldValues, pOrgId, pLeadValues, pUser, pDate) { - var isoLanguage = pLeadValues["ISOLANGUAGE"] ? pLeadValues["ISOLANGUAGE"] : "deu"; + var isoLanguage = pLeadValues["ISOLANGUAGE"]; //Person var PersValues = LeadImportUtils.setValues(pDataFields["PERSON"], pFieldDef, pFieldValues); @@ -830,7 +826,7 @@ LeadImportUtils.checkISOLanguage = function(pLanguage) .or("AB_LANGUAGE.NAME_LATIN", pLanguage) .cell(); - return iso3 ? iso3 : "deu"; + return iso3 ? iso3 : "eng"; }