Skip to content
Snippets Groups Projects
Commit fe76f929 authored by Sebastian Pongratz's avatar Sebastian Pongratz :ping_pong:
Browse files

Merge branch '1074245_attributeUsageError' into '2021.1.0'

1074245 AttributeUsage onValidation fix

See merge request xrm/basic!942
parents 34796631 92b068c0
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,6 @@
<siblings>
<element>Attribute_entity</element>
</siblings>
<onValidation>%aditoprj%/entity/AttributeUsage_entity/onValidation.js</onValidation>
<recordContainer>db</recordContainer>
<entityFields>
<entityProvider>
......
......@@ -3,7 +3,8 @@ import("system.vars");
import("system.translate");
import("Entity_lib");
var maxCount = vars.get("local.value");
var minCount = vars.getString("$field.MIN_COUNT");
var maxCount = vars.get("$local.value");
if (maxCount)
{
......@@ -12,4 +13,7 @@ if (maxCount)
result.string(translate.text("Maximal count must be one or higher"));
else if (maxCount != Math.floor(maxCount))
result.string(translate.text("Maximal count has to be a whole number"));
else if (minCount && minCount > maxCount)
result.string(translate.text("The minimal count can't be larger than the maximal count!"));
}
import("system.translate");
import("system.vars");
import("system.result");
var minCount = vars.getString("$field.MIN_COUNT");
var maxCount = vars.getString("$field.MAX_COUNT");
if (minCount != "" && maxCount != "" && minCount > maxCount)
result.string(translate.text("The minimal count can't be larger than the maximal count!"));
\ No newline at end of file
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