Open pri-kise opened 2 months ago
If we add a global variable to a page then the rule shouldn't trigger. What i don't like is that the rule suggest DisplayName.
DisplayName
page 50000 "PTE API Dimension Values" { APIGroup = 'projectapi'; APIPublisher = 'defaultpublisher'; APIVersion = 'v1.0'; Caption = 'Dimension Values'; ChangeTrackingAllowed = true; DelayedInsert = true; Editable = false; EntityCaption = 'Dimension Value'; EntityName = 'dimensionValue'; EntitySetCaption = 'Dimension Values'; EntitySetName = 'dimensionValues'; Extensible = false; ODataKeyFields = SystemId; PageType = API; SourceTable = "Dimension Value"; layout { area(Content) { repeater(Lines) { Caption = 'Lines'; ShowCaption = false; field(id; Rec.SystemId) { } field(dimensionCode; Rec."Dimension Code") { } field(dimensionName; DimensionGlobal.Name) // Wrong warning -> Or is this warnig really intended here? { } field("code"; Rec.Code) { } field(name; Rec.Name) // The warning here is correct for me. { } field(dimensionValueType; Rec."Dimension Value Type") { } field(blocked; Rec.Blocked) { } } } } var DimensionGlobal: Record Dimension; trigger OnAfterGetRecord() begin if not DimensionGlobal.Get(Rec."Dimension Code") then DimensionGlobal.Init(); end; }
This is indeed a false positive, where the rule shouldn't be raised.
In the update pre-release version of the LinterCop v0.30.28 this should now been resolved.
The version v0.30.28 of the LinterCop is now the latest release. Could you verify if this is now working as expected? If this is the case, you may close this issue.
If we add a global variable to a page then the rule shouldn't trigger. What i don't like is that the rule suggest
DisplayName
.