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

Merge branch 'sales_pn_1081141_fixattributevalidation' into '2021.1.0'

[Projekt: xRM-Sales][TicketNr.: 1081141][Angebot/ Beleg - Fehlermeldung bei Aufruf Neuanlage]

See merge request xrm/basic!957
parents 49b2292f b2d32387
No related branches found
No related tags found
No related merge requests found
......@@ -769,7 +769,7 @@ AttributeRelationUtils.validateAttributeCount = function (pRowId, pObjectType, p
}, countObj);
}
var possibleAttributes = AttributeUtil.getPossibleAttributes(pObjectType, undefined, pFilteredAttributeIds);
var possibleAttributes = AttributeUtil.getPossibleAttributes(pObjectType, undefined, pFilteredAttributeIds) || [];
var minMaxCounts = [];
if (possibleAttributes.length > 0)
......@@ -794,8 +794,8 @@ AttributeRelationUtils.validateAttributeCount = function (pRowId, pObjectType, p
// get all possible parent attributes
var possibleParentAttributes = newSelect("distinct ATTRIBUTE_PARENT_ID")
.from("AB_ATTRIBUTE")
.where("AB_ATTRIBUTE.AB_ATTRIBUTEID", possibleAttributes, SqlBuilder.IN())
.arrayColumn();
.whereIfSet("AB_ATTRIBUTE.AB_ATTRIBUTEID", possibleAttributes, SqlBuilder.IN())
.arrayColumn(true);
// remove empty elements
possibleParentAttributes = possibleParentAttributes.filter(function (el) { return el != null && el != ""; });
......
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