Replies: 1 comment 6 replies
-
This is an easy rule to create I believe. Are there exceptions that I should take into account? Like for example if Rec."Source Document" > 0 then The question is do we need the rule to raise when both sides are a Enum or also when only one side of the comparison is an Enum? |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We experienced an issue where we check on a enum value if it's bigger than a certain value -> if true then the related document which got the enum value assigned would be classified as (for example) a posted document.
Problem:
The enum is extensible and when somebody extends the enum (in another app) and adds for example values which cannot be classified as a posted document, this would result in a error in the meant comparison above.
Cases:
// OK
if (Rec."Source Document" in [Rec."Source Document"::"Posted S. Invoice", Rec."Source Document"::"Posted S. Shipment"]) then
// NOK -> Warning LC????: You should not use a greater / lower than comparison at enum values
if Rec."Source Document" >= Rec."Source Document"::"Posted S. Invoice" then
Beta Was this translation helpful? Give feedback.
All reactions