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

Merge branch '#1067374-LeadimportAttribute' into '2020.2'

#1067374-LeadimportAttribute Revert #1066477 und add cases

See merge request xrm/basic!467
parents 2e2fded2 3d32768d
No related branches found
No related tags found
No related merge requests found
...@@ -448,18 +448,28 @@ LeadImportUtils.insertAttr = function(pDataFields, pDataTypes, pFieldDef, pLeadV ...@@ -448,18 +448,28 @@ LeadImportUtils.insertAttr = function(pDataFields, pDataTypes, pFieldDef, pLeadV
DataValues["OBJECT_TYPE"] = pObjectID; DataValues["OBJECT_TYPE"] = pObjectID;
DataValues["AB_ATTRIBUTE_ID"] = attrdata[1][0]; DataValues["AB_ATTRIBUTE_ID"] = attrdata[1][0];
DataValues["OBJECT_ROWID"] = pContactId; DataValues["OBJECT_ROWID"] = pContactId;
switch(attrdata[1][1].trim())//type switch(attrdata[1][1].trim())//type
{ {
case AttributeTypes.COMBO(): case "COMBO":
value = AttributeUtil.getPossibleListValues(attrdata[1][0], attrdata[1][1]).filter(function (attrbute) { return attrbute[1] == value}); value = newSelect("AB_ATTRIBUTEID")
.from("AB_ATTRIBUTE")
type = AttributeTypes.COMBO.databaseField; .whereIfSet("AB_ATTRIBUTE.ATTRIBUTE_PARENT_ID", attrdata[1][0])
break; .and("AB_ATTRIBUTE.ATTRIBUTE_NAME", value)
.cell();
type = "ID_VALUE";
break;
case "TEXT":
type = "CHAR_VALUE";
break;
case "BOOLEAN":
type = "INT_VALUE";
break;
//other cases can be added here //other cases can be added here
} }
if (value.length && type != "") if (value.length && type != "")
{ {
DataValues[type] = value[0][0]; DataValues[type] = value;
LeadImportUtils.insertTable(pDataFields, pDataTypes, DataValues, "AB_ATTRIBUTERELATION", pUser, pDate); LeadImportUtils.insertTable(pDataFields, pDataTypes, DataValues, "AB_ATTRIBUTERELATION", pUser, pDate);
} }
} }
......
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