Skip to content
Snippets Groups Projects
Commit b1a9b420 authored by Jessica Luginger's avatar Jessica Luginger
Browse files

[Projekt: Entwicklung - xRM][TicketNr.: 1069809][ImporterMappingFunction...

[Projekt: Entwicklung - xRM][TicketNr.: 1069809][ImporterMappingFunction iAttribute - Attribut wird zu oft angelegt]
parent 034a7a1e
No related branches found
No related tags found
No related merge requests found
......@@ -142,7 +142,7 @@ function iAttribute(pObject)
if (i == 0)
{
var parent = "NULL";
var parent = null;
// select ab_attributeid from AB_ATTRIBUTE where ATTRIBUTE_NAME = 'Subordinate campaign of' and attribute_parent_id is null
id = newSelect(ab_attributeId, alias).from(ab_attribute).where(attribute_name, attributes[i])
.and(attribute_parent_id + " is null").cell();
......@@ -158,10 +158,18 @@ function iAttribute(pObject)
{
id = util.getNewUUID();
if (attributes.length == i+1) type = attributeType;
//TODO: add insertNoWait to instantly add AB_ATTRIBUTE records;
//this ensures that nothing is in the funcBuffer that does not exist in the database
//TODO: check: are COMOB-values added automatically?
var values = [id, parent, attributes[i], type, "1"];
if(parent == null)
{
values = [id, attributes[i], type, "1"];
columns = [ab_attributeId, attribute_name, attribute_type, attribute_active];
}
this.insertData(ab_attribute, columns, null, values, alias);
}
pathToFollow["childs"][attributes[i]]["id"] = id;
......
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