CodeCop Hidden AA0241
Use all lowercase letters for reserved language keywords.
Description
Use all lowercase letters for reserved language keywords. This rule does not apply to built-in methods and types; they must be written using Pascal case.
Remarks
We recommend following these best practices when developing extensions in AL to ensure consistency and discoverability on file, object, and method naming, as well as better readability of written code.
Data types in variable and parameter declarations aren't included in this rule because they're written using Pascal case.
Bad code example
trigger OnValidate()
BEGIN
IF "Order Date" > "Starting Date" THEN
Error(Text007, FieldCaption("Order Date"), FieldCaption("Starting Date"));
END;
VAR
Text007: Label '%1 cannot be greater than %2.';
Good code example
trigger OnValidate()
begin
if "Order Date" > "Starting Date" then
error(Text007, FieldCaption("Order Date"), FieldCaption("Starting Date"));
end;
var
Text007: Label '%1 cannot be greater than %2.'; // Label variable declaration in Pascal case
Good and bad practices for fixing the rule
Change every reserved language keyword to use lowercase letters. Use Pascal case for data types in variable and parameter declarations.
See Also
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기