├── .devcontainer ├── Dockerfile └── devcontainer.json ├── .gitattributes ├── .github └── workflows │ └── hugo.yml ├── .gitignore ├── .vscode └── tasks.json ├── CITATION.cff ├── CODE_OF_CONDUCT.md ├── LICENSE ├── README.md ├── SECURITY.md ├── SUPPORT.md ├── archetypes └── default.md ├── assets ├── icons │ ├── SiteLogo.png │ ├── favicon.ico │ └── logo.svg └── scss │ ├── _nav.scss │ ├── _sidebar-toc.scss │ ├── _styles_project.scss │ └── _variables_project.scss ├── content ├── _index.md ├── blog │ └── _index.md ├── docs │ ├── BestPractices │ │ ├── CustomTelemetry │ │ │ └── index.md │ │ ├── DeleteAll │ │ │ └── index.md │ │ ├── SetLoadFields │ │ │ └── Index.md │ │ ├── SubscriberCodeunits │ │ │ └── index.md │ │ ├── _index.md │ │ ├── api-page │ │ │ └── index.md │ │ ├── begin-as-an-afterword │ │ │ └── index.md │ │ ├── begin-end │ │ │ └── index.md │ │ ├── binary-operator-line-start │ │ │ └── index.md │ │ ├── blank-lines │ │ │ └── index.md │ │ ├── case-actions │ │ │ └── index.md │ │ ├── comments-spacing │ │ │ └── index.md │ │ ├── end-else-pair │ │ │ └── index.md │ │ ├── if-not-find-then-exit │ │ │ └── index.md │ │ ├── istemporary-table-safeguard │ │ │ └── index.md │ │ ├── keyboard-shortcuts │ │ │ └── index.md │ │ ├── keyword-pairs-indentation │ │ │ └── index.md │ │ ├── line-start-keywords │ │ │ └── index.md │ │ ├── lonely-repeat │ │ │ └── index.md │ │ ├── named-invocations │ │ │ └── index.md │ │ ├── one-statement-per-line │ │ │ └── index.md │ │ ├── separate-if-and-else │ │ │ └── index.md │ │ ├── spacing-binary-operators │ │ │ └── index.md │ │ ├── suggested-abbreviations │ │ │ └── index.md │ │ ├── unnecessary-else │ │ │ └── index.md │ │ ├── unnecessary-truefalse │ │ │ └── index.md │ │ ├── variable-naming │ │ │ └── index.md │ │ └── variables-declarations-order │ │ │ └── index.md │ ├── Contributing │ │ ├── ForkAndPR │ │ │ ├── ForkedRepro.png │ │ │ ├── fork_button.jpg │ │ │ └── index.md │ │ ├── FormattingTips │ │ │ └── index.md │ │ ├── InstallHugo │ │ │ ├── ManuallyOnWindows11 │ │ │ │ ├── EnvironmentVariables.png │ │ │ │ ├── EnvironmentVariablesPath.png │ │ │ │ ├── Extract.png │ │ │ │ ├── ExtractToBin.png │ │ │ │ ├── HugoServe.png │ │ │ │ ├── SearchForEnv.png │ │ │ │ ├── SelectExtended.png │ │ │ │ ├── SystemProperties.png │ │ │ │ └── index.md │ │ │ ├── TheShortcut │ │ │ │ ├── alguidelines codespace.mp4 │ │ │ │ ├── alguidelines walkthrough.mp4 │ │ │ │ └── index.md │ │ │ ├── UsingPowershellOnWindows11 │ │ │ │ └── index.md │ │ │ └── _index.md │ │ ├── Templates │ │ │ ├── BestPractice │ │ │ │ └── index.md │ │ │ ├── Patterns │ │ │ │ └── index.md │ │ │ └── _index.md │ │ ├── TheApprovalProcess │ │ │ └── index.md │ │ └── _index.md │ ├── NAVPatterns │ │ ├── 2-anti-patterns │ │ │ ├── _index.md │ │ │ ├── nav-upgrade │ │ │ │ ├── index.md │ │ │ │ └── upgrade.png │ │ │ └── reusable-bugs │ │ │ │ └── index.md │ │ ├── 3-cal-coding-guidelines │ │ │ ├── _index.md │ │ │ ├── design │ │ │ │ ├── _index.md │ │ │ │ ├── by-reference-parameters │ │ │ │ │ └── index.md │ │ │ │ ├── class-coupling │ │ │ │ │ └── index.md │ │ │ │ ├── cyclomatic-complexity │ │ │ │ │ └── index.md │ │ │ │ ├── encapsulate-local-functionality │ │ │ │ │ └── index.md │ │ │ │ ├── findset-findfirst-findlast │ │ │ │ │ └── index.md │ │ │ │ ├── initialized-variables │ │ │ │ │ └── index.md │ │ │ │ ├── maintainability-index │ │ │ │ │ └── index.md │ │ │ │ ├── parameter-placeholders │ │ │ │ │ └── index.md │ │ │ │ ├── static-object-invocation │ │ │ │ │ └── index.md │ │ │ │ ├── unreachable-code │ │ │ │ │ └── index.md │ │ │ │ ├── unused-initialized-variables │ │ │ │ │ └── index.md │ │ │ │ ├── unused-variables │ │ │ │ │ └── index.md │ │ │ │ ├── variable-capacity-mismatch │ │ │ │ │ └── index.md │ │ │ │ └── with-scope-name-collision │ │ │ │ │ └── index.md │ │ │ ├── internally-used-dot-net-types │ │ │ │ └── index.md │ │ │ ├── internationalization │ │ │ │ ├── _index.md │ │ │ │ └── using-calcdate │ │ │ │ │ └── index.md │ │ │ ├── localizability │ │ │ │ ├── _index.md │ │ │ │ ├── captionml-for-system-tables │ │ │ │ │ └── index.md │ │ │ │ ├── fieldcaption-and-tablecaption │ │ │ │ │ └── index.md │ │ │ │ ├── global-text-constants │ │ │ │ │ └── index.md │ │ │ │ ├── use-text-constants │ │ │ │ │ └── index.md │ │ │ │ └── using-optioncaptionml │ │ │ │ │ └── index.md │ │ │ ├── readability │ │ │ │ ├── _index.md │ │ │ │ ├── begin-as-an-afterword │ │ │ │ │ └── index.md │ │ │ │ ├── begin-end │ │ │ │ │ └── index.md │ │ │ │ ├── binary-operator-line-start │ │ │ │ │ └── index.md │ │ │ │ ├── blank-lines │ │ │ │ │ └── index.md │ │ │ │ ├── case-actions │ │ │ │ │ └── index.md │ │ │ │ ├── colon-usage-in-case │ │ │ │ │ └── index.md │ │ │ │ ├── comments-curly-brackets │ │ │ │ │ └── index.md │ │ │ │ ├── comments-spacing │ │ │ │ │ └── index.md │ │ │ │ ├── end-else-pair │ │ │ │ │ └── index.md │ │ │ │ ├── indentation │ │ │ │ │ └── index.md │ │ │ │ ├── keyword-pairs-indentation │ │ │ │ │ └── index.md │ │ │ │ ├── line-start-keywords │ │ │ │ │ └── index.md │ │ │ │ ├── lonely-repeat │ │ │ │ │ └── index.md │ │ │ │ ├── named-invocations │ │ │ │ │ └── index.md │ │ │ │ ├── nested-withs │ │ │ │ │ └── index.md │ │ │ │ ├── one-statement-per-line │ │ │ │ │ └── index.md │ │ │ │ ├── separate-if-and-else │ │ │ │ │ └── index.md │ │ │ │ ├── spacing-binary-operators │ │ │ │ │ └── index.md │ │ │ │ ├── spacing-brackets-and │ │ │ │ │ └── index.md │ │ │ │ ├── spacing-unary-operators │ │ │ │ │ └── index.md │ │ │ │ ├── suggested-abbreviations │ │ │ │ │ └── index.md │ │ │ │ ├── temporary-variable-naming │ │ │ │ │ └── index.md │ │ │ │ ├── textconst-suffixes │ │ │ │ │ └── index.md │ │ │ │ ├── unary-operator-line-end │ │ │ │ │ └── index.md │ │ │ │ ├── unnecessary-compound-parenthesis │ │ │ │ │ └── index.md │ │ │ │ ├── unnecessary-else │ │ │ │ │ └── index.md │ │ │ │ ├── unnecessary-function-parenthesis │ │ │ │ │ └── index.md │ │ │ │ ├── unnecessary-separators │ │ │ │ │ └── index.md │ │ │ │ ├── unnecessary-truefalse │ │ │ │ │ └── index.md │ │ │ │ ├── variable-already-scoped │ │ │ │ │ └── index.md │ │ │ │ ├── variable-naming │ │ │ │ │ └── index.md │ │ │ │ └── variables-declarations-order │ │ │ │ │ └── index.md │ │ │ └── ux │ │ │ │ ├── _index.md │ │ │ │ ├── actions-images │ │ │ │ └── index.md │ │ │ │ ├── confirm │ │ │ │ └── index.md │ │ │ │ ├── fielderror │ │ │ │ └── index.md │ │ │ │ └── message-and-error │ │ │ │ └── index.md │ │ ├── 4-get-involved │ │ │ ├── _index.md │ │ │ ├── code-of-conduct │ │ │ │ └── index.md │ │ │ ├── patterns-authors │ │ │ │ └── index.md │ │ │ └── template-for-writing-nav-design-patterns │ │ │ │ ├── PatternLogo.png │ │ │ │ └── index.md │ │ ├── _index.md │ │ ├── patterns │ │ │ ├── _index.md │ │ │ ├── activity-log │ │ │ │ ├── Activity-Log-NAV.jpg │ │ │ │ ├── Activity-Log.jpg │ │ │ │ └── index.md │ │ │ ├── argument-table │ │ │ │ ├── 0218.Argument-Table-image.png │ │ │ │ └── index.md │ │ │ ├── blocked-entity │ │ │ │ ├── 2260.BlockedEntityPattern.png │ │ │ │ ├── 3056.BlockedEntityPattern_5F00_5F00_5F00_Option.png │ │ │ │ ├── 8637.BlockedEntityPattern_5F00_5F00_5F00_Boolean.png │ │ │ │ ├── _index.md │ │ │ │ └── data-driven-blocked-entity │ │ │ │ │ ├── attention.jpg │ │ │ │ │ └── index.md │ │ │ ├── cached-web-service-calls │ │ │ │ ├── Cached_5F00_Web_5F00_Service_5F00_Calls_5F00_Diagram.png │ │ │ │ └── index.md │ │ │ ├── conditional-cascading-update │ │ │ │ ├── 3124.T18_5F00_Name_5F00_OnValidate.png │ │ │ │ └── index.md │ │ │ ├── copy-document │ │ │ │ ├── clip_5F00_image006.jpg │ │ │ │ ├── clip_5F00_image008.jpg │ │ │ │ ├── clip_5F00_image010.jpg │ │ │ │ ├── clip_image002.gif-750x0.png │ │ │ │ ├── clip_image004.gif-750x0.png │ │ │ │ └── index.md │ │ │ ├── create-data-from-templates │ │ │ │ ├── 2134.Picture6.png │ │ │ │ ├── 2816.Picture3.png │ │ │ │ ├── 3482.Picture-5.png │ │ │ │ ├── 4118.Picture1.png │ │ │ │ ├── 4341.Picture4.png │ │ │ │ ├── 7271.Picture4.png │ │ │ │ └── index.md │ │ │ ├── create-urls-to-nav-clients │ │ │ │ ├── 1778.url1.jpg │ │ │ │ ├── 7802.url2.jpg │ │ │ │ └── index.md │ │ │ ├── creating-custom-charts │ │ │ │ ├── 0246.Picture6.png │ │ │ │ ├── 1411.Picture2.png │ │ │ │ ├── 1541.Picture7.png │ │ │ │ ├── 1781.Picture5.png │ │ │ │ ├── 1803.Picture7.png │ │ │ │ ├── 2553.Picture8.png │ │ │ │ ├── 5153.Picture1.png │ │ │ │ ├── 5545.Picture9.png │ │ │ │ ├── 5582.Picture10.png │ │ │ │ └── index.md │ │ │ ├── cross-session-events │ │ │ │ ├── PubSub.png │ │ │ │ └── index.md │ │ │ ├── currently-active-record │ │ │ │ ├── 6545.Table.png │ │ │ │ └── index.md │ │ │ ├── data-migration-facade │ │ │ │ ├── 8308.logo.png │ │ │ │ ├── NoStagingTableNew2.png │ │ │ │ ├── StagingTableNew2.png │ │ │ │ ├── errorhandling1.png │ │ │ │ ├── errorhandling2.png │ │ │ │ └── index.md │ │ │ ├── discovery-event │ │ │ │ ├── Pic2.jpg │ │ │ │ ├── Pic2b.jpg │ │ │ │ ├── Pic3.jpg │ │ │ │ ├── Pic4.jpg │ │ │ │ ├── ServiceConnections.jpg │ │ │ │ └── index.md │ │ │ ├── document │ │ │ │ ├── 0005.Document-Pattern-UML-Class-Diagram.jpg │ │ │ │ ├── 2086.Design-Pattern-Document-SubPage-Properties.png │ │ │ │ └── index.md │ │ │ ├── easy-update-of-setup-or-supplementary-information │ │ │ │ ├── 0654.easy-update-1.png │ │ │ │ ├── 4024.easy-update-2.png │ │ │ │ └── index.md │ │ │ ├── error-message-processing │ │ │ │ ├── image001.png │ │ │ │ ├── image003.png │ │ │ │ └── index.md │ │ │ ├── extending-the-role-center-headlines │ │ │ │ ├── 0724.Headline-sequence-diagram-v2.png │ │ │ │ ├── 3733.logo.png │ │ │ │ ├── Headline.png │ │ │ │ └── index.md │ │ │ ├── feature-localization-for-data-structures │ │ │ │ ├── 3058.Feature-localization-for-data-structures-3.png │ │ │ │ ├── 5123.Feature-localization-for-data-structures-1.png │ │ │ │ ├── 6052.Feature-localization-for-data-structures-2.png │ │ │ │ └── index.md │ │ │ ├── hooks │ │ │ │ ├── 5383.HookPattern1.png │ │ │ │ ├── 6378.HookPattern2.png │ │ │ │ ├── 8156.HookPattern3.png │ │ │ │ ├── 8875.HookPattern4.png │ │ │ │ └── index.md │ │ │ ├── implementation-of-surrogate-keys-using-autoincrement-pattern │ │ │ │ ├── 0333.Figure-3.PNG │ │ │ │ ├── 0458.Figure-1.PNG │ │ │ │ ├── 0552.Example-Figure-5.png │ │ │ │ ├── 0638.Figure-2.PNG │ │ │ │ ├── 1488.Example-Figure-1.png │ │ │ │ ├── 1884.Example-Figure-7.png │ │ │ │ ├── 2068.Example-Figure-4.png │ │ │ │ ├── 4477.Example-Figure-6.png │ │ │ │ ├── 4532.Example-Figure-3.png │ │ │ │ ├── 4682.Example-Figure-2.png │ │ │ │ └── index.md │ │ │ ├── instructions-in-the-ui │ │ │ │ ├── 2804.Picture-2.png │ │ │ │ ├── 5707.Picture-4.png │ │ │ │ ├── 6215.picture-1.png │ │ │ │ ├── 6685.picture-3.png │ │ │ │ ├── 7217.picture-1.png │ │ │ │ ├── 7245.Picture-2.png │ │ │ │ └── index.md │ │ │ ├── integration-of-addresses │ │ │ │ └── index.md │ │ │ ├── journal-error-processing │ │ │ │ ├── 0005.Journal-Error-Processing-2.jpg │ │ │ │ ├── 0777.Journal-Error-Processing.jpg │ │ │ │ ├── 5518.Journal-Error-Processing-1.jpg │ │ │ │ ├── 5661.Journal-Error-Processing-8.jpg │ │ │ │ ├── 8640.Journal-Error-Processing-3.jpg │ │ │ │ └── index.md │ │ │ ├── journal-template-batch-line │ │ │ │ ├── 2438.Journal-Template-Batch-Line-1.jpg │ │ │ │ ├── 8103.Journal-Template-Batch-Line-2.jpg │ │ │ │ └── index.md │ │ │ ├── master-data │ │ │ │ ├── PageCardDefinition.PNG │ │ │ │ ├── PageCardPropertiesV2.PNG │ │ │ │ ├── PageListDefinition.PNG │ │ │ │ ├── PageListPropertiesV2.PNG │ │ │ │ ├── Table.PNG │ │ │ │ ├── TablePropertiesV2.PNG │ │ │ │ └── index.md │ │ │ ├── multi-file-download │ │ │ │ └── index.md │ │ │ ├── multi-page-list │ │ │ │ ├── Multi-page-list-img-1.jpg │ │ │ │ ├── Multi-page-list-img-2.jpg │ │ │ │ └── index.md │ │ │ ├── multilanguage-application-data │ │ │ │ ├── 2746.3.png │ │ │ │ ├── 4812.4.png │ │ │ │ ├── 5670.1.png │ │ │ │ ├── 6746.2.png │ │ │ │ └── index.md │ │ │ ├── net-exception-handling-in-cal │ │ │ │ ├── 1856.DotNet_5F00_Exception_5F00_Handling_5F00_in_5F00_CAL_5F00_Diagram.png │ │ │ │ ├── _index.md │ │ │ │ └── tryfunction-net-exception-handling-in-cal │ │ │ │ │ ├── TryFunction_5F00_DotNet_5F00_Exception_5F00_Handling_5F00_in_5F00_CAL.png │ │ │ │ │ └── index.md │ │ │ ├── no-series │ │ │ │ ├── 1452.2.png │ │ │ │ ├── 3527.3.png │ │ │ │ ├── 5661.1.png │ │ │ │ └── index.md │ │ │ ├── notifications │ │ │ │ ├── _index.md │ │ │ │ ├── in-context-notifications │ │ │ │ │ ├── 2514.Fig4.png │ │ │ │ │ ├── 2526.Fig11.png │ │ │ │ │ ├── 6646.Fig9.png │ │ │ │ │ ├── 6724.Fig2.png │ │ │ │ │ ├── 7701.Fig1.png │ │ │ │ │ └── index.md │ │ │ │ └── notification-lifecycle-management-pattern │ │ │ │ │ ├── 0677.3-notifications-smaller.PNG │ │ │ │ │ ├── 4807.1st-notification.PNG │ │ │ │ │ ├── 6138.logo.png │ │ │ │ │ ├── 8512.2nd-notification.PNG │ │ │ │ │ ├── index.md │ │ │ │ │ ├── sequence1.png │ │ │ │ │ ├── sequence2.png │ │ │ │ │ └── sequence3.png │ │ │ ├── observer │ │ │ │ └── index.md │ │ │ ├── posting-routine-select-behavior │ │ │ │ ├── 1563.PostingRoutineSelectBehaviour2.png │ │ │ │ ├── 5428.PostingRoutineSelectBehaviour3.png │ │ │ │ ├── 6170.PostingRoutineSelectBehaviour4.png │ │ │ │ ├── 7585.PostingRoutineSelectBehaviour1.png │ │ │ │ └── index.md │ │ │ ├── product-name │ │ │ │ ├── ProductName-Logo.png │ │ │ │ ├── ProductName-Sample.PNG │ │ │ │ ├── ProductName-output.png │ │ │ │ └── index.md │ │ │ ├── queries │ │ │ │ ├── _index.md │ │ │ │ ├── select-distinct-with-queries │ │ │ │ │ ├── 6521.clip_5F00_image001.png │ │ │ │ │ ├── Untitled-picture.png │ │ │ │ │ ├── clip_5F00_image002.png │ │ │ │ │ ├── clip_5F00_image003.png │ │ │ │ │ ├── clip_5F00_image004.png │ │ │ │ │ ├── clip_5F00_image005.png │ │ │ │ │ ├── clip_5F00_image006.png │ │ │ │ │ ├── clip_5F00_image007.png │ │ │ │ │ ├── clip_5F00_image008.png │ │ │ │ │ └── index.md │ │ │ │ ├── use-queries-to-detect-duplicate-records │ │ │ │ │ ├── clip_5F00_image002.jpg │ │ │ │ │ └── index.md │ │ │ │ └── use-queries-to-replace-nested-loops │ │ │ │ │ ├── 5040.clip_5F00_image002.png │ │ │ │ │ └── index.md │ │ │ ├── read-once-initialization-and-validation │ │ │ │ ├── 2465.5.png │ │ │ │ ├── 4.png │ │ │ │ ├── 4314.3.png │ │ │ │ ├── 4477.2.png │ │ │ │ ├── 5025.2.png │ │ │ │ ├── 5672.8.png │ │ │ │ ├── 5857.1.png │ │ │ │ ├── 6332.1.png │ │ │ │ └── index.md │ │ │ ├── released-entity │ │ │ │ └── index.md │ │ │ ├── report-selection │ │ │ │ └── index.md │ │ │ ├── security │ │ │ │ ├── 1-sensitive-data-encapsulation │ │ │ │ │ ├── Data-Encapsulation-_2D00_-figure-1.png │ │ │ │ │ ├── Logo-_2D00_-Protected-Data-Encapsulation.png │ │ │ │ │ ├── Multi-_2D00_-1-2.JPG │ │ │ │ │ └── index.md │ │ │ │ ├── 2-data-encryption │ │ │ │ │ ├── Encryption-_2D00_-1.JPG │ │ │ │ │ ├── Encryption-_2D00_-2.png │ │ │ │ │ ├── Encryption-_2D00_-3.png │ │ │ │ │ ├── Encryption-_2D00_-4.png │ │ │ │ │ ├── Encryption-_2D00_-5.png │ │ │ │ │ ├── Logo-_2D00_-Encryption.png │ │ │ │ │ ├── Multi-_2D00_-1-2-3.JPG │ │ │ │ │ └── index.md │ │ │ │ ├── 3-single-point-of-access │ │ │ │ │ ├── Logo-_2D00_-Single-Point-of-Access.png │ │ │ │ │ ├── Multi-_2D00_-1-2-3-4.JPG │ │ │ │ │ └── index.md │ │ │ │ ├── 4-masked-text │ │ │ │ │ ├── Logo-_2D00_-Masked-Text.png │ │ │ │ │ ├── Masking-_2D00_-CRM-Connection-Setup-page.PNG │ │ │ │ │ └── index.md │ │ │ │ ├── 5-ssl-in-nav │ │ │ │ │ ├── Logo-_2D00_-SSL.JPG │ │ │ │ │ ├── SSL-_2D00_-before-and-after.PNG │ │ │ │ │ └── index.md │ │ │ │ └── _index.md │ │ │ ├── setup-specificity-fallback │ │ │ │ ├── 0724.Printer-Selection.png │ │ │ │ ├── 2335.FindPrinter.png │ │ │ │ └── index.md │ │ │ ├── silent-file-upload-and-download │ │ │ │ ├── 6428.Silent-File-download-design-pattern.png │ │ │ │ ├── 8688.Silent-file-upload-and-download-NAV-design-pattern.png │ │ │ │ └── index.md │ │ │ ├── singleton │ │ │ │ ├── 0535.Singleton.png │ │ │ │ ├── _index.md │ │ │ │ ├── singleton-codeunit │ │ │ │ │ ├── 2313.Singleton-Codeunit-_2D00_-CSIDE-SingleInstance-property.PNG │ │ │ │ │ ├── Singleton-Codeunit-_2D00_-example-_2D00_-bad.PNG │ │ │ │ │ ├── Singleton-Codeunit-_2D00_-example-_2D00_-good.PNG │ │ │ │ │ ├── Singleton-Codeunit.png │ │ │ │ │ └── index.md │ │ │ │ └── singleton-table │ │ │ │ │ ├── 5554.Singleton-Table.png │ │ │ │ │ ├── _index.md │ │ │ │ │ ├── cue-table │ │ │ │ │ ├── Cue-Table-Figure-1.JPG │ │ │ │ │ ├── Cue-Table.png │ │ │ │ │ └── index.md │ │ │ │ │ └── setup-table │ │ │ │ │ ├── 6675.NAVSetupTablePattern2.png │ │ │ │ │ ├── Setup-Table.png │ │ │ │ │ └── index.md │ │ │ ├── standard-journal │ │ │ │ ├── 0143.Standard-Document-Pattern-2.png │ │ │ │ ├── 0456.Standard-Journal.png │ │ │ │ ├── 0820.Standard-Document-Pattern-1.png │ │ │ │ ├── 5327.Standard-Document-Pattern-3.png │ │ │ │ └── index.md │ │ │ ├── temporary-dataset-report │ │ │ │ ├── 0250.Temporary-Dataset-Report-1.png │ │ │ │ ├── 2376.Temporary-Dataset-Report-2.png │ │ │ │ ├── 4010.Temporary-Dataset-Report-6.jpg │ │ │ │ ├── 4118.Temporary-Dataset-Report-5.jpg │ │ │ │ ├── 6523.Temporary-Dataset-Report-4.jpg │ │ │ │ ├── 7607.Temporary-Dataset-Report-3.png │ │ │ │ └── index.md │ │ │ ├── totals-and-discounts-on-subpages-sales-and-purchases │ │ │ │ ├── 4300.Fig-1.jpg │ │ │ │ ├── 6305.Fig-4.jpg │ │ │ │ ├── Fig-10.jpg │ │ │ │ ├── Fig-11.jpg │ │ │ │ ├── Fig-12.jpg │ │ │ │ ├── Fig-2.jpg │ │ │ │ ├── Fig-3.jpg │ │ │ │ ├── Fig-5.jpg │ │ │ │ ├── Fig-6.jpg │ │ │ │ ├── Fig-7.jpg │ │ │ │ ├── Fig-8.jpg │ │ │ │ ├── Fig-9.jpg │ │ │ │ └── index.md │ │ │ ├── transfer-custom-fields │ │ │ │ └── index.md │ │ │ └── variant-facade │ │ │ │ ├── Picture2.png │ │ │ │ ├── Picture3.png │ │ │ │ ├── Picture4.png │ │ │ │ ├── Picture5.png │ │ │ │ ├── Picture6.png │ │ │ │ ├── Picture7.png │ │ │ │ ├── Picture8.png │ │ │ │ ├── index.md │ │ │ │ └── picture1.png │ │ └── related-links │ │ │ └── index.md │ ├── _index.md │ └── patterns │ │ ├── _index.md │ │ ├── api-delegate-operation │ │ └── index.md │ │ ├── api-register-fieldset │ │ └── index.md │ │ ├── command-queue │ │ ├── index.md │ │ └── queue.png │ │ ├── error-handling │ │ └── index.md │ │ ├── event-bridge-pattern │ │ └── index.md │ │ ├── facade-pattern │ │ ├── diagram.jpg │ │ └── index.md │ │ ├── generic-method-pattern │ │ └── index.md │ │ ├── no-series │ │ └── index.md │ │ └── template-method-pattern │ │ └── index.md └── search.md ├── go.mod ├── go.sum ├── hugo.toml ├── layouts └── partials │ ├── logo.html │ ├── navbar.html │ ├── page-meta-lastmod.html │ └── page-meta-links.html ├── package-lock.json ├── package.json └── static ├── CNAME ├── favicon.ico ├── favicons ├── android-chrome-192x192.png ├── android-chrome-512x512.png ├── android-chrome-maskable-192x192.png ├── android-chrome-maskable-512x512.png ├── apple-touch-icon-120x120.png ├── apple-touch-icon-152x152.png ├── apple-touch-icon-167x167.png ├── apple-touch-icon-60x60.png ├── apple-touch-icon-76x76.png ├── apple-touch-icon.png ├── coast-228x228.png ├── favicon-128x128.png ├── favicon-256x256.png ├── favicon-48x48.png ├── favicon-64x64.png ├── favicon-96x96.png ├── favicon.ico ├── msapplication-icon-144x144.png └── mstile-150x150.png └── images ├── Hero_Side_Device_BC_Capability.png ├── SiteLogo.png ├── body-img-1.png ├── brainstorming-team-meeting_38894532.png ├── hero-bg.png ├── hero-bg.webp ├── wave.webp └── whats-new-bg.webp /.devcontainer/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax=docker/dockerfile:1 2 | FROM mcr.microsoft.com/devcontainers/base:ubuntu-22.04 3 | 4 | # VARIANT can be either 'hugo' for the standard version or 'hugo_extended' for the extended version. 5 | ARG VARIANT=hugo_extended 6 | # VERSION can be either 'latest' or a specific version number 7 | ARG VERSION=latest 8 | 9 | # Download Hugo 10 | RUN case ${VERSION} in \ 11 | latest) \ 12 | export VERSION=$(curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4)}') ;;\ 13 | esac && \ 14 | echo ${VERSION} && \ 15 | case $(uname -m) in \ 16 | aarch64) \ 17 | export ARCH=ARM64 ;; \ 18 | *) \ 19 | export ARCH=64bit ;; \ 20 | esac && \ 21 | echo ${ARCH} && \ 22 | wget -O ${VERSION}.tar.gz https://github.com/gohugoio/hugo/releases/download/v${VERSION}/${VARIANT}_${VERSION}_Linux-${ARCH}.tar.gz && \ 23 | tar xf ${VERSION}.tar.gz && \ 24 | mv hugo /usr/bin/hugo 25 | 26 | # Hugo dev server port 27 | EXPOSE 1313 28 | -------------------------------------------------------------------------------- /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | // For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: 2 | // https://github.com/microsoft/vscode-dev-containers/tree/v0.217.4/containers/hugo 3 | { 4 | "name": "Hugo", 5 | "build": { 6 | "dockerfile": "Dockerfile" 7 | }, 8 | "customizations": { 9 | "vscode": { 10 | // Set *default* container specific settings.json values on container create. 11 | "settings": { 12 | "html.format.templating": true 13 | }, 14 | // Add the IDs of extensions you want installed when the container is created. 15 | "extensions": [ 16 | "bungcip.better-toml", 17 | "davidanson.vscode-markdownlint", 18 | "GitHub.vscode-pull-request-github" 19 | ] 20 | } 21 | }, 22 | // Use 'forwardPorts' to make a list of ports inside the container available locally. 23 | "forwardPorts": [ 24 | 1313 25 | ], 26 | "remoteUser": "vscode", 27 | // Use 'postCreateCommand' to run commands after the container is created. 28 | // "postCreateCommand": "" 29 | "features": { 30 | "ghcr.io/devcontainers/features/git:1": {}, 31 | "ghcr.io/devcontainers/features/go:1": {}, 32 | "ghcr.io/devcontainers/features/hugo:1": {}, 33 | "ghcr.io/devcontainers/features/node:1": {} 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | *.{cmd,[cC][mM][dD]} text eol=crlf 3 | *.{bat,[bB][aA][tT]} text eol=crlf 4 | *.gif binary 5 | *.jpeg binary 6 | *.png binary 7 | *.gz binary 8 | *.jar binary -------------------------------------------------------------------------------- /.github/workflows/hugo.yml: -------------------------------------------------------------------------------- 1 | # Sample workflow for building and deploying a Hugo site to GitHub Pages 2 | name: Deploy Hugo site to Pages 3 | 4 | on: 5 | # Runs on pushes targeting the default branch 6 | push: 7 | branches: ["main"] 8 | 9 | # Allows you to run this workflow manually from the Actions tab 10 | workflow_dispatch: 11 | 12 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages 13 | permissions: 14 | contents: read 15 | pages: write 16 | id-token: write 17 | 18 | # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. 19 | # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. 20 | concurrency: 21 | group: "pages" 22 | cancel-in-progress: false 23 | 24 | # Default to bash 25 | defaults: 26 | run: 27 | shell: bash 28 | 29 | jobs: 30 | # Build job 31 | build: 32 | runs-on: ubuntu-latest 33 | env: 34 | HUGO_VERSION: 0.133.1 35 | steps: 36 | - name: Install Hugo CLI 37 | run: | 38 | wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ 39 | && sudo dpkg -i ${{ runner.temp }}/hugo.deb 40 | - name: Install Dart Sass 41 | run: sudo snap install dart-sass 42 | - name: Checkout 43 | uses: actions/checkout@v3 44 | - name: Setup Pages 45 | id: pages 46 | uses: actions/configure-pages@v3 47 | - name: Install Node.js dependencies 48 | run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" 49 | - name: Build with Hugo 50 | env: 51 | # For maximum backward compatibility with Hugo modules 52 | HUGO_ENVIRONMENT: production 53 | HUGO_ENV: production 54 | run: | 55 | hugo \ 56 | --minify \ 57 | --baseURL "${{ steps.pages.outputs.base_url }}/" 58 | - name: Upload artifact 59 | uses: actions/upload-pages-artifact@v2 60 | with: 61 | path: ./public 62 | 63 | # Deployment job 64 | deploy: 65 | environment: 66 | name: github-pages 67 | url: ${{ steps.deployment.outputs.page_url }} 68 | runs-on: ubuntu-latest 69 | needs: build 70 | steps: 71 | - name: Deploy to GitHub Pages 72 | id: deployment 73 | uses: actions/deploy-pages@v2 74 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | public/ 2 | /node_modules/ 3 | /resources/_gen/ 4 | 5 | ## Locking files for when working with local servers 6 | .hugo_build.lock 7 | package-lock.json 8 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "Start local Hugo server", 6 | "type": "shell", 7 | "command": "hugo serve", 8 | "problemMatcher": [] 9 | } 10 | ] 11 | } -------------------------------------------------------------------------------- /CITATION.cff: -------------------------------------------------------------------------------- 1 | cff-version: 1.2.0 2 | title: ALGuidelines.dev 3 | abstract: | 4 | "Microsoft ALGuidelines - A Community driven project. 5 | 6 | Best Practices and Design Patterns for the AL Language." 7 | keywords: 8 | - AL 9 | - "Design Patterns" 10 | - "Best Practices" 11 | authors: 12 | - given-names: Eric 13 | family-names: Wauters 14 | - given-names: Arend-Jan 15 | family-names: Kauffmann 16 | - given-names: Henrik 17 | family-names: Helgesen 18 | orcid: https://orcid.org/0000-0002-3281-6712 19 | - given-names: Jeremy 20 | family-names: Vyska 21 | license: MIT 22 | url: "https://alguidelines.dev" 23 | repository-code: "https://github.com/microsoft/alguidelines" -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Microsoft Open Source Code of Conduct 2 | 3 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 4 | 5 | Resources: 6 | 7 | - [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) 8 | - [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) 9 | - Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE 22 | -------------------------------------------------------------------------------- /SUPPORT.md: -------------------------------------------------------------------------------- 1 | # TODO: The maintainer of this repo has not yet edited this file 2 | 3 | **REPO OWNER**: Do you want Customer Service & Support (CSS) support for this product/project? 4 | 5 | - **No CSS support:** Fill out this template with information about how to file issues and get help. 6 | - **Yes CSS support:** Fill out an intake form at [aka.ms/spot](https://aka.ms/spot). CSS will work with/help you to determine next steps. More details also available at [aka.ms/onboardsupport](https://aka.ms/onboardsupport). 7 | - **Not sure?** Fill out a SPOT intake as though the answer were "Yes". CSS will help you decide. 8 | 9 | *Then remove this first heading from this SUPPORT.MD file before publishing your repo.* 10 | 11 | # Support 12 | 13 | ## How to file issues and get help 14 | 15 | This project uses GitHub Issues to track bugs and feature requests. Please search the existing 16 | issues before filing new issues to avoid duplicates. For new issues, file your bug or 17 | feature request as a new Issue. 18 | 19 | For help and questions about using this project, please **REPO MAINTAINER: INSERT INSTRUCTIONS HERE 20 | FOR HOW TO ENGAGE REPO OWNERS OR COMMUNITY FOR HELP. COULD BE A STACK OVERFLOW TAG OR OTHER 21 | CHANNEL. WHERE WILL YOU HELP PEOPLE?**. 22 | 23 | ## Microsoft Support Policy 24 | 25 | Support for this **PROJECT or PRODUCT** is limited to the resources listed above. 26 | -------------------------------------------------------------------------------- /archetypes/default.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "{{ replace .Name "-" " " | title }}" 3 | date: {{ .Date }} 4 | draft: true 5 | --- 6 | 7 | -------------------------------------------------------------------------------- /assets/icons/SiteLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/assets/icons/SiteLogo.png -------------------------------------------------------------------------------- /assets/icons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/assets/icons/favicon.ico -------------------------------------------------------------------------------- /assets/icons/logo.svg: -------------------------------------------------------------------------------- 1 | AL logo_VS_smallest version_v3 -------------------------------------------------------------------------------- /assets/scss/_sidebar-toc.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Right side toc 3 | // 4 | .td-sidebar-toc { 5 | border-left: 1px solid $border-color; 6 | 7 | @supports (position: sticky) { 8 | position: sticky; 9 | top: 4rem; 10 | height: calc(100vh - 4rem); 11 | overflow-y: auto; 12 | } 13 | 14 | order: 2; 15 | padding-top: 0.75rem; 16 | padding-bottom: 1.5rem; 17 | vertical-align: top; 18 | 19 | } 20 | 21 | .td-page-meta { 22 | a { 23 | display: block; 24 | font-weight: $font-weight-medium; 25 | } 26 | } 27 | 28 | .td-toc { 29 | padding-top: 5px; 30 | margin-top: 10px; 31 | border-top: 1px solid $black; 32 | 33 | a { 34 | display: block; 35 | font-weight: $font-weight-medium; 36 | padding-bottom: .25rem; 37 | } 38 | 39 | li { 40 | list-style: none; 41 | display: block; 42 | } 43 | 44 | li li { 45 | margin-left: 0.5rem; 46 | } 47 | 48 | #TableOfContents { 49 | // Hugo's ToC is a mouthful, this can be used to style the top level h2 entries. 50 | > ul > li > ul > li > a {} 51 | 52 | a { 53 | color: $gray-600; 54 | 55 | &:hover { 56 | color: $blue; 57 | text-decoration: none; 58 | } 59 | } 60 | } 61 | 62 | ul { 63 | padding-left: 0; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /assets/scss/_styles_project.scss: -------------------------------------------------------------------------------- 1 | .td-page-meta--child { display: none !important; } 2 | .td-page-meta--project-issue { display: none !important; } 3 | 4 | .td-content pre code { 5 | font-family: Consolas, "Courier New", monospace; 6 | size: 115%; 7 | } -------------------------------------------------------------------------------- /content/blog/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "AL Guidelines Blog" 3 | linkTitle: "Blog" 4 | type: "blog" 5 | --- -------------------------------------------------------------------------------- /content/docs/BestPractices/DeleteAll/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "DeleteAll" 3 | tags: ["AL","Performance"] 4 | categories: ["Best Practice"] 5 | --- 6 | 7 | _Created by waldo, Described by waldo_ 8 | 9 | ## Description 10 | 11 | When you perform a "DeleteAll" when there is nothing to delete, it will still perform a lock. When you for example perform a DeleteAll on an empty table, it will result in a table lock. 12 | Therefore it's good practice to always check if the table is empty when performing a DeleteAll. 13 | 14 | ## Bad code 15 | 16 | ```al 17 | EmptyTableWLD.SetRange(Code, 'AJ'); 18 | EmptyTableWLD.DeleteAll(true); 19 | ``` 20 | 21 | ## Good code 22 | 23 | ```al 24 | EmptyTableWLD.SetRange(Code, 'AJ'); 25 | if not EmptyTableWLD.IsEmpty() then 26 | EmptyTableWLD.DeleteAll(true); 27 | ``` 28 | -------------------------------------------------------------------------------- /content/docs/BestPractices/SetLoadFields/Index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "SetLoadFields" 3 | tags: ["AL","Readability"] 4 | categories: ["Best Practice"] 5 | --- 6 | 7 | See the documentation on learn.microsoft.com for more information about [SetLoadFields](https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/record/record-setloadfields-method). 8 | 9 | For the performance of your code it is important that you use SetLoadFields as much as possible. 10 | 11 | If you want to retrieve a record from the database to check if the record is available always use SetLoadFields on the primary key fields of the table so only those fields will be retrieved from the database. 12 | 13 | ## Bad code 14 | 15 | ```AL 16 | if not Item.Get(ItemNo) then 17 | exit(); 18 | ``` 19 | 20 | ## Good code 21 | 22 | ```AL 23 | Item.SetLoadFields("No."); 24 | if not Item.Get(ItemNo) then 25 | exit(); 26 | ``` 27 | 28 | 29 | Place the SetLoadFields in the code before the line of the Get (or find). (there is no need to record filter fields in the SetLoadFields because these will be retrieved automatically). 30 | ## Bad code 31 | 32 | ```AL 33 | Item.SetLoadFields("Item Category Code"); 34 | Item.SetRange("Third Party Item Exists", false); 35 | Item.FindFirst(); 36 | ``` 37 | 38 | ## Good code 39 | 40 | ```AL 41 | Item.SetRange("Third Party Item Exists", false); 42 | Item.SetLoadFields("Item Category Code"); 43 | Item.FindFirst(); 44 | ``` 45 | 46 | Place the SetLoadFields in the code before the case statement 47 | ## Bad code 48 | 49 | ```AL 50 | Item.SetLoadFields("Item Category Code"); 51 | ItemCategoryCode := FindItemCategoryCode; 52 | 53 | case true of 54 | Item.Get(ItemNo): 55 | SetItemCategoryCode(Item, ItemCategoryCode); 56 | end; 57 | ``` 58 | 59 | ## Good code 60 | 61 | ```AL 62 | ItemCategoryCode := FindItemCategoryCode; 63 | Item.SetLoadFields("Item Category Code"); 64 | 65 | case true of 66 | Item.Get(ItemNo): 67 | SetItemCategoryCode(Item, ItemCategoryCode); 68 | end; 69 | ``` 70 | -------------------------------------------------------------------------------- /content/docs/BestPractices/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Best Practices" 3 | weight: 3 4 | description: > 5 | AL Code Best Practices 6 | --- 7 | 8 | This section will be cover things that aren't as simple as Design Patterns, but will help make sure your development is: 9 | 10 | - high-performance 11 | - complies with good designs 12 | - has high maintainability 13 | 14 | ## Readability 15 | 16 | Generally, all readability rules are Microsoft style choices only. You can use them to keep consistency with the existing code. 17 | 18 | ## Performance 19 | 20 | Some guidelines are simply better for performance considerations rather than readability or anything else. In this section, let's look into some.. 21 | 22 | ## Discussion 23 | 24 | All discussion related to Best Practice are to be found on the Github Repo's Discussion pages, found [here](https://github.com/microsoft/alguidelines/discussions/categories/bc-best-practices) 25 | -------------------------------------------------------------------------------- /content/docs/BestPractices/begin-as-an-afterword/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "begin as an afterword" 3 | tags: ["AL","Readability"] 4 | categories: ["Best Practice"] 5 | --- 6 | 7 | _Created by Microsoft, Described by waldo_ 8 | 9 | ## Description 10 | 11 | When `begin` follows `then`, `else`, `do`, it should be on the same line, preceded by one space character. 12 | 13 | ## Bad code 14 | 15 | ```al 16 | if ICPartnerRefType = ICPartnerRefType::"Common Item No." then 17 | begin 18 | ... 19 | end; 20 | ``` 21 | 22 | ## Good code 23 | 24 | ```al 25 | if ICPartnerRefType = ICPartnerRefType::"Common Item No." then begin 26 | ... 27 | end; 28 | ``` 29 | -------------------------------------------------------------------------------- /content/docs/BestPractices/begin-end/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Begin-End - Compound Only" 3 | tags: ["AL","Readability"] 4 | categories: ["Best Practice"] 5 | --- 6 | 7 | _Created by Microsoft, Described by waldo_ 8 | 9 | Only use begin..end to enclose [compound statements](https://docs.microsoft.com/en-us/cpp/c-language/compound-statement-c?view=msvc-170#:~:text=A%20compound%20statement%20%28also%20called%20a%20%22block%22%29%20typically,appear%20at%20the%20head%20of%20a%20compound%20statement.). 10 | 11 | ## Example 1 12 | 13 | ### Bad code 14 | 15 | ```AL 16 | if FindSet() then begin 17 | repeat 18 | ... 19 | until next() = 0; 20 | end; 21 | ``` 22 | 23 | ### Good code 24 | 25 | ```AL 26 | if FindSet() then 27 | repeat 28 | ... 29 | until next() = 0; 30 | ``` 31 | 32 | ## Example 2 33 | 34 | ### Bad code 35 | 36 | ```AL 37 | if IsAssemblyOutputLine then begin 38 | TestField("Order Line No.", 0); 39 | end; 40 | ``` 41 | 42 | ### Good code 43 | 44 | ```AL 45 | if IsAssemblyOutputLine then 46 | TestField("Order Line No.", 0); 47 | ``` 48 | 49 | ## Exception 50 | 51 | ```AL 52 | // Except for this case 53 | if X then begin 54 | if Y then 55 | //DO SOMETHING; 56 | end else 57 | (not X) 58 | ``` 59 | 60 | ## Tips 61 | 62 | The [AZ AL Dev Tools/AL Code Outline](https://marketplace.visualstudio.com/items?itemName=andrzejzwierzchowski.al-code-outline) extension adds two new commands to Visual Studio Code to remove begin..end around single statements. 63 | 64 | - `Remove Begin..End around Single Statements from the Active Editor` : removes begin..end around single statement from the current editor 65 | - `Remove Begin..End around Single Statements from the Active Project` : removes begin..end around single statement from the current project 66 | -------------------------------------------------------------------------------- /content/docs/BestPractices/binary-operator-line-start/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Binary Operator to Start Line" 3 | tags: ["AL","Readability"] 4 | categories: ["Best Practice"] 5 | --- 6 | 7 | _Created by Microsoft, Described by waldo_ 8 | 9 | ## Description 10 | 11 | Do not start a line with a binary operator. 12 | 13 | ## Bad code 14 | 15 | ```AL 16 | "Quantity to Ship" := 17 | Quantity 18 | - "Quantity Shipped" 19 | ``` 20 | 21 | ## Good code 22 | 23 | ```AL 24 | "Quantity to Ship" := 25 | Quantity - 26 | "Quantity Shipped" 27 | ``` 28 | -------------------------------------------------------------------------------- /content/docs/BestPractices/blank-lines/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "When not to use Blank Lines" 3 | tags: ["AL","Readability"] 4 | categories: ["Best Practice"] 5 | --- 6 | 7 | ## Description 8 | 9 | Do not use blank lines: 10 | 11 | - at the beginning or end of any functions (after `begin` and before `end`) 12 | - inside multiline expression 13 | - after blank lines 14 | 15 | ## Example 1 16 | 17 | ### Bad code 18 | 19 | ```al 20 | procedure MATRIX_OnDrillDown(MATRIX_ColumnOrdinal: Integer) 21 | begin 22 | 23 | SetupDrillDownCol(MATRIX_ColumnOrdinal); 24 | DrillDown(false, ValueType); 25 | 26 | end; 27 | ``` 28 | 29 | ### Good code 30 | 31 | ```al 32 | procedure MATRIX_OnDrillDown(MATRIX_ColumnOrdinal: Integer) 33 | begin 34 | SetupDrillDownCol(MATRIX_ColumnOrdinal); 35 | DrillDown(false, ValueType); 36 | end; 37 | ``` 38 | 39 | ## Example 2 40 | 41 | ### Bad code 42 | 43 | ```al 44 | if NameIsValid and 45 | 46 | Name2IsValid 47 | then 48 | ``` 49 | 50 | ### Good code 51 | 52 | ```al 53 | if NameIsValid and 54 | Name2IsValid 55 | then 56 | ``` 57 | 58 | ## Example 3 59 | 60 | ### Bad code 61 | 62 | ```al 63 | var 64 | GLSetup: Record "General Ledger Setup"; 65 | GLSetupRead: Boolean; 66 | 67 | 68 | local procedure GetGLSetup() 69 | begin 70 | if not GLSetupRead then 71 | GLSetup.Get(); 72 | 73 | 74 | GLSetupRead := true; 75 | 76 | 77 | OnAfterGetGLSetup(GLSetup); 78 | end; 79 | 80 | 81 | [IntegrationEvent(false, false)] 82 | local procedure OnAfterGetGLSetup(var GLSetup: Record "General Ledger Setup") 83 | begin 84 | end; 85 | ``` 86 | 87 | ### Good code 88 | 89 | ```al 90 | var 91 | GLSetup: Record "General Ledger Setup"; 92 | GLSetupRead: Boolean; 93 | 94 | local procedure GetGLSetup() 95 | begin 96 | if not GLSetupRead then 97 | GLSetup.Get(); 98 | 99 | GLSetupRead := true; 100 | 101 | OnAfterGetGLSetup(GLSetup); 102 | end; 103 | 104 | [IntegrationEvent(false, false)] 105 | local procedure OnAfterGetGLSetup(var GLSetup: Record "General Ledger Setup") 106 | begin 107 | end; 108 | ``` 109 | 110 | ## Tips 111 | 112 | The [AZ AL Dev Tools/AL Code Outline](https://marketplace.visualstudio.com/items?itemName=andrzejzwierzchowski.al-code-outline) extension adds two new commands to Visual Studio Code to remove empty duplicate lines. 113 | 114 | - `Remove Empty Lines from the Active Editor` : removes empty duplicate lines from the current editor 115 | - `Remove Empty Lines from the Active Project` : removes empty duplicate lines from the current project 116 | -------------------------------------------------------------------------------- /content/docs/BestPractices/case-actions/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "CASE Action on next line" 3 | tags: ["AL","Readability"] 4 | categories: ["Best Practice"] 5 | --- 6 | 7 | _Created by Microsoft, Described by waldo_ 8 | 9 | ## Description 10 | 11 | A CASE action should start on a line after the possibility. 12 | 13 | ## Bad code 14 | 15 | ```AL 16 | case Letter of 17 | 'A': Letter2 := '10'; 18 | 'B': Letter2 := '11'; 19 | end; 20 | ``` 21 | 22 | ## Good code 23 | 24 | ```AL 25 | case Letter of 26 | 'A': 27 | Letter2 := '10'; 28 | 'B': 29 | Letter2 := '11'; 30 | end; 31 | ``` 32 | -------------------------------------------------------------------------------- /content/docs/BestPractices/comments-spacing/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Comment Spacing" 3 | tags: ["AL","Readability"] 4 | categories: ["Best Practice"] 5 | --- 6 | 7 | _Created by Microsoft, Described by waldo_ 8 | 9 | ## Description 10 | 11 | Always start comments with // followed by one space character. 12 | 13 | ## Bad code 14 | 15 | ```al 16 | RowNo += 1000; //Move way below the budget 17 | ``` 18 | 19 | ## Good code 20 | 21 | ```al 22 | RowNo += 1000; // Move way below the budget 23 | ``` 24 | -------------------------------------------------------------------------------- /content/docs/BestPractices/end-else-pair/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "end else pair" 3 | tags: ["AL","Readability"] 4 | categories: ["Best Practice"] 5 | --- 6 | 7 | _Created by Microsoft, Described by waldo_ 8 | 9 | ## Description 10 | 11 | The `end else` pair should always appear on the same line. 12 | 13 | ## Bad code 14 | 15 | ```al 16 | if OppEntry.Find('-') then 17 | if SalesCycleStage.Find('-') then begin 18 | ... 19 | end 20 | else 21 | begin 22 | ... 23 | end; 24 | ``` 25 | 26 | ## Good code 27 | 28 | ```al 29 | if OppEntry.Find('-') then 30 | if SalesCycleStage.Find('-') then begin 31 | ... 32 | end else begin 33 | ... 34 | end; 35 | ``` 36 | -------------------------------------------------------------------------------- /content/docs/BestPractices/istemporary-table-safeguard/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "IsTemporary record safeguard" 3 | tags: ["AL"] 4 | categories: ["Best Practice"] 5 | --- 6 | 7 | _Created by Kine, Described by Kine_ 8 | 9 | ## Description 10 | 11 | When you are working with temporary tables or real tables, you can have code, where you assume that Record variable is or is not temporary. Best practice is to not assume, but test it to be sure. In history, 12 | many developers went through painful period when they did unwanted "DeleteAll" over real table in production database, because they were only assuming something (mostly it happened only once to them). 13 | 14 | Therefore it is good practice to use [Record.IsTemporary()](https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/record/record-istemporary-method) method to test this predicate, mainly when you are doing destructive action. 15 | 16 | Another case when it is good practice to use this test is when you are subscribing to triggers on table. In most cases, you do not want to run your code when the trigger is running over temporary record. And you cannot assume, that 17 | this specific table will not be used as temporary by someone else. Reacting to the trigger as if it was triggered by real table change could lead to corrupted data or unpredictable errors and the reason could be hard to find. 18 | 19 | ## Bad code 20 | 21 | ```al 22 | ShouldBeTemporary.DeleteAll(true); 23 | ``` 24 | 25 | or 26 | 27 | ```al 28 | [EventSubscriber(ObjectType::Table, Database::"Some Table", 'OnAfterInsertEvent', '', false, false)] 29 | local procedure DoSomethingOnAfterInsertSomeTable(var Rec: Record "Some Table") 30 | begin 31 | DoSomething(Rec); 32 | end; 33 | ``` 34 | 35 | ## Good code 36 | 37 | ```al 38 | if ShouldBeTemporary.IsTemporary() then 39 | ShouldBeTemporary.DeleteAll(true); 40 | ``` 41 | 42 | or 43 | 44 | ```al 45 | if not ShouldBeTemporary.IsTemporary() then 46 | Error(RecNotTemporaryErr); 47 | ShouldBeTemporary.DeleteAll(true); 48 | ``` 49 | 50 | or 51 | 52 | ```al 53 | [EventSubscriber(ObjectType::Table, Database::"Some Table", 'OnAfterInsertEvent', '', false, false)] 54 | local procedure DoSomethingOnAfterInsertSomeTable(var Rec: Record "Some Table") 55 | begin 56 | if Rec.IsTemporary() then 57 | Exit; 58 | DoSomething(Rec); 59 | end; 60 | ``` 61 | -------------------------------------------------------------------------------- /content/docs/BestPractices/keyboard-shortcuts/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Keyboard Shortcuts" 3 | tags: ["AL","Productivity"] 4 | categories: ["Best Practice"] 5 | --- 6 | 7 | _Created by Christian Lenz, Described by Christian Lenz_ 8 | 9 | ## Description 10 | 11 | To increase developer productivity while coding, use keyboard shortcuts that are available in the specific context to execute actions faster. 12 | 13 | This is a selection of the community's favorites (more to come). 14 | 15 | **Windows** 16 | 17 | | What | Where | How | 18 | |---|---|---| 19 | | Delete word | Editor | CTRL + Backspace | 20 | 21 | 22 | **VS Code** 23 | 24 | | What | Where | How | 25 | |---|---|---| 26 | | Switch Tab | Editor | ALT + | 27 | | Move Line Up/Down | Editor | ALT + | 28 | | Copy Line Below/Above | Editor | ALT + SHIFT + | 29 | | Delete Line | Editor | CTRL + X (without selection) | 30 | | Add Selection To Next Match | Editor | CTRL + D | 31 | | Select All Occurences Of Find Match | Editor | CTRL + SHIFT + L | 32 | | Add Cursors To Line Ends | Editor | SHIFT + ALT + I (after selecting lines) | 33 | | Add Cursor Above/Below | Editor | CTRL + ALT + | 34 | | Place Multiple Cursors Manually | Editor | ALT + Click | 35 | | Fast Scrolling | Editor | ALT + Mouse Wheel | 36 | | Go To Symbol In File | Editor | CTRL + SHIFT + O | 37 | | Breadcrumbs - Open And Select | Editor | CTRL + SHIFT + . | 38 | | Go Back / Forward | Go To Definition | ALT + | 39 | 40 | -------------------------------------------------------------------------------- /content/docs/BestPractices/keyword-pairs-indentation/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Keyword Pairs - Indentation" 3 | tags: ["AL","Readability"] 4 | categories: ["Best Practice"] 5 | --- 6 | 7 | _Created by Microsoft, Described by waldo_ 8 | 9 | ## Description 10 | 11 | The `if..then` pair, `while..do` pair, and `for..do` pair must appear on the same line or the same level of indentation. If possible, you can align the lines it is even much more readable. 12 | 13 | ## Bad code 14 | 15 | ```al 16 | if (x = y) and 17 | (a = b) then 18 | ``` 19 | 20 | ## Good code 21 | 22 | ```al 23 | if (x = y) and 24 | (a = b) 25 | then 26 | ``` 27 | -------------------------------------------------------------------------------- /content/docs/BestPractices/line-start-keywords/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Line Start Keywords" 3 | tags: ["AL","Readability"] 4 | categories: ["Best Practice"] 5 | --- 6 | _Created by Microsoft, Described by waldo_ 7 | 8 | ## Description 9 | 10 | The `end`, `if`, `repeat`, `for`, `while`, `else` and `case` statement should always start a line. 11 | 12 | ## Bad code 13 | 14 | ```al 15 | if IsContactName then ValidateContactName() 16 | else if IsSalespersonCode then ValidateSalespersonCode() 17 | else if IsSalesCycleCode then ValidatSalesCycleCode(); 18 | ``` 19 | 20 | ## Good code 21 | 22 | ```al 23 | if IsContactName then 24 | ValidateContactName() 25 | else 26 | if IsSalespersonCode then 27 | ValidateSalespersonCode() 28 | else 29 | if IsSalesCycleCode then 30 | ValidatSalesCycleCode(); 31 | ``` 32 | -------------------------------------------------------------------------------- /content/docs/BestPractices/lonely-repeat/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Lonely Repeat" 3 | tags: ["AL","Readability"] 4 | categories: ["Best Practice"] 5 | --- 6 | 7 | _Created by Microsoft, Described by waldo_ 8 | 9 | ## Description 10 | 11 | The `repeat` statement should always be alone on a line. 12 | 13 | ## Bad code 14 | 15 | ```al 16 | if ReservEntry.FindSet() then repeat 17 | ``` 18 | 19 | ## Good code 20 | 21 | ```al 22 | if ReservEntry.FindSet() then 23 | repeat 24 | ``` 25 | -------------------------------------------------------------------------------- /content/docs/BestPractices/named-invocations/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Named Invocations" 3 | tags: ["AL","Readability"] 4 | categories: ["Best Practice"] 5 | --- 6 | 7 | _Created by Microsoft, Described by waldo_ 8 | 9 | ## Description 10 | 11 | When calling an object statically use the Object Name, not the Object Id. 12 | 13 | ## Bad code 14 | 15 | ```al 16 | Page.RunModal(525, SalesShptLine); 17 | ``` 18 | 19 | ## Good code 20 | 21 | ```al 22 | Page.RunModal(Page::"Posted Sales Shipment Lines", SalesShptLine); 23 | ``` 24 | 25 | ## Tips 26 | 27 | The [BusinessCentral.LinterCop](https://marketplace.visualstudio.com/items?itemName=StefanMaron.businesscentral-lintercop) extension adds a new rule to check your code for hardcoded object IDs. 28 | 29 | - [LC0012](https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0012): Using hardcoded IDs in functions like Codeunit.Run() is not allowed. 30 | -------------------------------------------------------------------------------- /content/docs/BestPractices/one-statement-per-line/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "One Statement per Line" 3 | tags: ["AL","Readability"] 4 | categories: ["Best Practice"] 5 | --- 6 | 7 | _Created by Microsoft, Described by waldo_ 8 | 9 | ## Description 10 | 11 | A line of code should not have more than one statement. 12 | 13 | ## Example 1 14 | 15 | ### Bad code 16 | 17 | ```al 18 | if OppEntry.Find('-') then exit; 19 | ``` 20 | 21 | ### Good code 22 | 23 | ```al 24 | if OppEntry.Find('-') then 25 | exit; 26 | ``` 27 | 28 | ## Example 2 29 | 30 | ### Bad code 31 | 32 | ```al 33 | TotalCost += Cost; TotalAmt += Amt; 34 | ``` 35 | 36 | ### Good code 37 | 38 | ```al 39 | TotalCost += Cost; 40 | TotalAmt += Amt; 41 | ``` 42 | -------------------------------------------------------------------------------- /content/docs/BestPractices/separate-if-and-else/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Seperate if and else" 3 | tags: ["AL","Readability"] 4 | categories: ["Best Practice"] 5 | --- 6 | 7 | _Created by Microsoft, Described by waldo_ 8 | 9 | ## Description 10 | 11 | `if` and `else` statements should be on separate lines. 12 | 13 | ## Bad code 14 | 15 | ```al 16 | if Atom = '>' then HasLogicalOperator := true else begin 17 | ... 18 | end; 19 | ``` 20 | 21 | ## Good code 22 | 23 | ```al 24 | if Atom = '>' then 25 | HasLogicalOperator := true 26 | else begin 27 | ... 28 | end; 29 | ``` 30 | -------------------------------------------------------------------------------- /content/docs/BestPractices/spacing-binary-operators/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Spacing Binary Operators" 3 | tags: ["AL","Readability"] 4 | categories: ["Best Practice"] 5 | --- 6 | 7 | _Created by Microsoft, Described by waldo_ 8 | 9 | ## Description 10 | 11 | There must be exactly one space character on each side of a binary operator such as = + - AND OR =. The parameter comma operator however, should have a space after the comma. 12 | 13 | ## Example 1 14 | 15 | ### Bad code 16 | 17 | ```al 18 | "Line Discount %" := "Line Discount Amount"/"Line Value"*100; 19 | ``` 20 | 21 | ### Good code 22 | 23 | ```al 24 | "Line Discount %" := "Line Discount Amount" / "Line Value" * 100; 25 | ``` 26 | 27 | ## Example 2 28 | 29 | ### Bad code 30 | 31 | ```al 32 | StartDate := CalcDate('<+'+Format(Days+i)+'D\>',StartDate); 33 | ``` 34 | 35 | ### Good code 36 | 37 | ```al 38 | StartDate := CalcDate('<+' + Format(Days + i) + 'D\>', StartDate); 39 | ``` 40 | 41 | ## Example 3 42 | 43 | ### Bad code 44 | 45 | ```al 46 | StartDate:=0D; // Initialize 47 | ``` 48 | 49 | ### Good code 50 | 51 | ```al 52 | StartDate := 0D; // Initialize 53 | ``` 54 | -------------------------------------------------------------------------------- /content/docs/BestPractices/unnecessary-else/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Unnecessary else" 3 | tags: ["AL","Readability"] 4 | categories: ["Best Practice"] 5 | --- 6 | 7 | _Created by Microsoft, Described by waldo_ 8 | 9 | ## Description 10 | 11 | `else` should not be used when the last action in the `then` part is an `exit`, `break`, `skip`, `quit`, `error`. 12 | 13 | ## Bad code 14 | 15 | ```al 16 | procedure SomeProcedure() 17 | begin 18 | if IsAdjmtBinCodeChanged() then 19 | Error(AdjmtBinCodeChangeNotAllowedErr, ...) 20 | else 21 | Error(BinCodeChangeNotAllowedErr, ...); 22 | end; 23 | ``` 24 | 25 | ## Good code 26 | 27 | ```al 28 | procedure SomeProcedure() 29 | begin 30 | if IsAdjmtBinCodeChanged() then 31 | Error(AdjmtBinCodeChangeNotAllowedErr, ...) 32 | Error(BinCodeChangeNotAllowedErr, ...); 33 | end; 34 | ``` 35 | -------------------------------------------------------------------------------- /content/docs/BestPractices/unnecessary-truefalse/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Unnecessary true/false" 3 | tags: ["AL","Readability"] 4 | categories: ["Best Practice"] 5 | --- 6 | 7 | _Created by Microsoft, Described by waldo_ 8 | 9 | ## Description 10 | Do not use `true` or `false` keywords unnecessarily if the expression is already an logical expression. 11 | 12 | ## Example 1 13 | 14 | ### Bad code 15 | 16 | ```al 17 | if IsPositive() = true then 18 | ``` 19 | 20 | ### Good code 21 | 22 | ```al 23 | if IsPositive() then 24 | ``` 25 | 26 | ## Example 2 27 | 28 | ### Bad code 29 | 30 | ```al 31 | if Complete <> true then 32 | ``` 33 | 34 | ### Good code 35 | 36 | ```al 37 | if not Complete then 38 | ``` 39 | -------------------------------------------------------------------------------- /content/docs/BestPractices/variable-naming/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Variable Naming" 3 | tags: ["AL","Readability"] 4 | categories: ["Best Practice"] 5 | --- 6 | 7 | _Created by Microsoft, Described by waldo_ 8 | 9 | ## Description 10 | 11 | Variables that refer to a AL object must contain the objects name, abbreviated where necessary. 12 | 13 | A variable must begin with a capital letter. 14 | 15 | Blanks, periods, and other characters (such as parentheses) that would make quotation marks around a variable necessary must be omitted. 16 | 17 | If a variable is a compound of two or more words or abbreviations, each word or abbreviation should begin with a capital letter. 18 | 19 | ## Example 1 20 | 21 | ### Bad code 22 | 23 | ```al 24 | WIPBuffer: Record "Job WIP Buffer" 25 | ``` 26 | 27 | ### Good code 28 | 29 | ```al 30 | JobWIPBuffer: Record "Job WIP Buffer" 31 | ``` 32 | 33 | ## Example 2 34 | 35 | ### Bad code 36 | 37 | ```al 38 | Postline: Codeunit "Gen. Jnl.-Post Line"; 39 | ``` 40 | 41 | ### Good code 42 | 43 | ```al 44 | GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; 45 | ``` 46 | 47 | ## Example 3 48 | 49 | ### Bad code 50 | 51 | ```al 52 | "Amount (LCY)": Decimal; 53 | ``` 54 | 55 | ### Good code 56 | 57 | ```al 58 | AmountLCY: Decimal; 59 | ``` 60 | 61 | ## Tips 62 | 63 | The [AL Variable Helper](https://marketplace.visualstudio.com/items?itemName=rasmus.al-var-helper) extension provides Intellisense support to assign correct variable names in AL. 64 | -------------------------------------------------------------------------------- /content/docs/BestPractices/variables-declarations-order/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Variables Declarations Order" 3 | tags: ["AL","Readability"] 4 | categories: ["Best Practice"] 5 | --- 6 | 7 | _Created by Microsoft, Described by waldo_ 8 | 9 | ## Description 10 | 11 | Variables declarations should be ordered by type. In general, object and complex variable types are listed first followed by simple variables. The order should be: 12 | 13 | - Record 14 | - Report 15 | - Codeunit 16 | - XmlPort 17 | - Page 18 | - Query 19 | - Notification 20 | - BigText 21 | - DateFormula 22 | - RecordId 23 | - RecordRef 24 | - FieldRef 25 | - FilterPageBuilder 26 | 27 | (Ref: [Microsoft Docs](https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/analyzers/codecop-aa0021)) 28 | 29 | ## Bad code 30 | 31 | ```al 32 | StartingDateFilter: Text; 33 | Vendor: Record Vendor; 34 | ``` 35 | 36 | ## Good code 37 | 38 | ```al 39 | Vendor: Record Vendor; 40 | StartingDateFilter: Text; 41 | ``` 42 | 43 | ## Tips 44 | 45 | The [AZ AL Dev Tools/AL Code Outline](https://marketplace.visualstudio.com/items?itemName=andrzejzwierzchowski.al-code-outline) extension adds two new commands to Visual Studio Code to sorts variables. 46 | 47 | - `Sort Variables in the Active Editor` : sorts variables in the current editor 48 | - `Sort Variables in the Active Project` : sorts variables in the current project 49 | -------------------------------------------------------------------------------- /content/docs/Contributing/ForkAndPR/ForkedRepro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/Contributing/ForkAndPR/ForkedRepro.png -------------------------------------------------------------------------------- /content/docs/Contributing/ForkAndPR/fork_button.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/Contributing/ForkAndPR/fork_button.jpg -------------------------------------------------------------------------------- /content/docs/Contributing/InstallHugo/ManuallyOnWindows11/EnvironmentVariables.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/Contributing/InstallHugo/ManuallyOnWindows11/EnvironmentVariables.png -------------------------------------------------------------------------------- /content/docs/Contributing/InstallHugo/ManuallyOnWindows11/EnvironmentVariablesPath.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/Contributing/InstallHugo/ManuallyOnWindows11/EnvironmentVariablesPath.png -------------------------------------------------------------------------------- /content/docs/Contributing/InstallHugo/ManuallyOnWindows11/Extract.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/Contributing/InstallHugo/ManuallyOnWindows11/Extract.png -------------------------------------------------------------------------------- /content/docs/Contributing/InstallHugo/ManuallyOnWindows11/ExtractToBin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/Contributing/InstallHugo/ManuallyOnWindows11/ExtractToBin.png -------------------------------------------------------------------------------- /content/docs/Contributing/InstallHugo/ManuallyOnWindows11/HugoServe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/Contributing/InstallHugo/ManuallyOnWindows11/HugoServe.png -------------------------------------------------------------------------------- /content/docs/Contributing/InstallHugo/ManuallyOnWindows11/SearchForEnv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/Contributing/InstallHugo/ManuallyOnWindows11/SearchForEnv.png -------------------------------------------------------------------------------- /content/docs/Contributing/InstallHugo/ManuallyOnWindows11/SelectExtended.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/Contributing/InstallHugo/ManuallyOnWindows11/SelectExtended.png -------------------------------------------------------------------------------- /content/docs/Contributing/InstallHugo/ManuallyOnWindows11/SystemProperties.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/Contributing/InstallHugo/ManuallyOnWindows11/SystemProperties.png -------------------------------------------------------------------------------- /content/docs/Contributing/InstallHugo/ManuallyOnWindows11/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Manually on Windows 11" 3 | --- 4 | 5 | This guide will walk You thrugh installing Hugo on a Windows 11 PC. For the official install guide, You can wisit . 6 | 7 | ## Download Binaries 8 | 9 | The path of least resistance is to just download the .zip file from the official Hugo GitHub Repository [here](https://github.com/gohugoio/hugo/releases). 10 | 11 | The theme that are used, needs the extended version of Hugo, so make sure to download the **extended** version by ensuring the file name starts with `hugo_extended...` 12 | 13 | {{% alert title="info" color="info" %}} 14 | For the purpose of this install guide, we are assuming You will want to follow the "standard" used by Hugo for installing. We will be creating a `Hugo` folder in the root of `C:\`. That folder will have a `Bin` folder for the binaries, and a `Sites` folder for each website You are building. 15 | 16 | Once You are done, You should have a folder structure that looks like this: 17 | 18 | ```text 19 | C:\Hugo 20 | ├── Bin # Binaries 21 | └┬─ Sites # Hugo Site Repositories 22 | └── alguidelines # Hugo Source for alguidelines.dev 23 | ``` 24 | 25 | {{% /alert %}} 26 | 27 | ![image](SelectExtended.png) 28 | 29 | After downloading the .zip file, extract the zip-file to `c:\Hugo\Bin` 30 | 31 | ![image](Extract.png) 32 | 33 | ![image](ExtractToBin.png) 34 | 35 | ## Add Hugo to Path 36 | 37 | After copying the binaries to Your PC, You will need to add Hugo binaries to the `%PATH%` system environment variables. 38 | 39 | To do that, search for `environment` 40 | 41 | ![image](SearchForEnv.png) 42 | 43 | once you see the `Edit the system environment variables`, open it and select `Environment Variables` 44 | 45 | ![image](SystemProperties.png) 46 | 47 | Once the Environment Variables screen is open, highlight the `Path` lines and press the `Edit...` button 48 | 49 | ![image](EnvironmentVariables.png) 50 | 51 | Now press `New` and add the `C:\Hugo\Bin` to the path. Press `OK` and `OK` to save the new `Path` 52 | 53 | ![image](EnvironmentVariablesPath.png) 54 | 55 | Once complete. You should now be able to preview the Hugo site on by opening a command promt, and open the `C:\Hugo\Sites\alguidelines` folder and execute `Hugo Serve` 56 | 57 | ![image](HugoServe.png) -------------------------------------------------------------------------------- /content/docs/Contributing/InstallHugo/TheShortcut/alguidelines codespace.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/Contributing/InstallHugo/TheShortcut/alguidelines codespace.mp4 -------------------------------------------------------------------------------- /content/docs/Contributing/InstallHugo/TheShortcut/alguidelines walkthrough.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/Contributing/InstallHugo/TheShortcut/alguidelines walkthrough.mp4 -------------------------------------------------------------------------------- /content/docs/Contributing/InstallHugo/UsingPowershellOnWindows11/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | Title: Powershell on Windows 11 3 | description: > 4 | Install Hugo with a simple Powershell Script and chocolatey 5 | --- 6 | 7 | It is possible to use a powershell script and Chocolatey to install and other dependencies. Execute the following script: 8 | 9 | ```powershell 10 | Set-ExecutionPolicy Bypass -Scope Process -Force 11 | [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 12 | Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) 13 | choco install -y nodejs 14 | choco install -y hugo-extended 15 | ``` 16 | 17 | Once complete, in root of of the repository execute the following commands 18 | 19 | ```powershell 20 | git submodule update --init --recursive --depth 1 21 | npm install 22 | ``` 23 | -------------------------------------------------------------------------------- /content/docs/Contributing/InstallHugo/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Install Hugo 3 | --- 4 | 5 | There are multiple ways to install Hugo for you to properly preview your contributions. Please select the scenario that matches your setup. 6 | 7 | For the official install guide, you can visit 8 | 9 | {{< youtube G7umPCU-8xc >}} 10 | -------------------------------------------------------------------------------- /content/docs/Contributing/Templates/BestPractice/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Title Here" 3 | tags: ["AL"] 4 | categories: ["Best Practice"] 5 | --- 6 | 7 | 8 | 9 | 10 | _Created by Described by _ 11 | 12 | ## Description 13 | 14 | In depth description on what this Pattern is all about 15 | 16 | - basic components 17 | - how the interact 18 | - steps to implement 19 | - considerations to take 20 | 21 | ## Bad code 22 | 23 | ```al 24 | PutCodeblocksHere() 25 | ``` 26 | 27 | ## Good code 28 | 29 | ```al 30 | PutCodeblocksHere() 31 | ``` 32 | -------------------------------------------------------------------------------- /content/docs/Contributing/Templates/Patterns/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Title Here" 3 | tags: ["AL"] 4 | categories: ["Pattern"] 5 | --- 6 | 7 | 8 | 9 | _Created by Described by _ 10 | 11 | ## Abstract 12 | 13 | Short, descriptive and easy to remember description of this pattern. 14 | 15 | ## Context 16 | 17 | Sets the stage where the pattern takes place. 1-2 sentences. 18 | 19 | ## Problem 20 | 21 | What happens before this pattern is used? How can it go wrong? 1-5 lines. 22 | 23 | ## Description 24 | 25 | In depth description on what this Pattern is all about 26 | 27 | - basic components 28 | - how the interact 29 | - steps to implement 30 | - considerations to take 31 | 32 | ## Usage 33 | 34 | If applicable: where is it used in an app. You can refer to any app, BaseApp, or a (public) ISV app. 35 | 36 | ## Benefits 37 | 38 | 1-2 sentences: what did you just solve 39 | 40 | ## When not to use 41 | 42 | Usually, there are occasions where NOT to implement the pattern. List the disadvantages of this pattern here. 43 | 44 | ## List of references 45 | 46 | Youtube-link? BaseApp? Tweet? ... 47 | -------------------------------------------------------------------------------- /content/docs/Contributing/Templates/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Templates" 3 | --- 4 | 5 | We have created some template-files that you can simply copy and use. Look at them as "Patterns for describing patterns" 6 | 7 | We currently offer the following templates: 8 | 9 | - for [Patterns](/contributing/templates/patterns/) ([raw](https://raw.githubusercontent.com/microsoft/alguidelines/main/content/docs/Contributing/Templates/Patterns/index.md)) 10 | - for [Best Practice](/contributing/templates/bestpractice/) ([raw](https://raw.githubusercontent.com/microsoft/alguidelines/main/content/docs/Contributing/Templates/BestPractice/index.md)) 11 | 12 | opening the "raw" link, will allow for the best copy/paste result. 13 | -------------------------------------------------------------------------------- /content/docs/Contributing/TheApprovalProcess/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | chapter = true 3 | pre = " " 4 | title = "Understanding the Approval Process" 5 | weight = 100 6 | +++ 7 | 8 | (coming soon) 9 | 10 | -------------------------------------------------------------------------------- /content/docs/Contributing/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | chapter = true 3 | pre = " " 4 | title = "Contributing" 5 | weight = 100 6 | +++ 7 | 8 | First off, we're glad you want to help! The project team is kind and helpful, so if you're not sure if you have a good first contribution, make a [Discussion](https://github.com/microsoft/alguidelines/discussions/) about it or even just create your first try. You'll get feedback and we will be happy to help refine it, if it even needs it. 9 | 10 | ## Code of Conduct 11 | 12 | This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. 13 | 14 | When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. 15 | 16 | This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments. 17 | 18 | ## Steps to Contribute 19 | 20 | * [Guide to Fork & PR](/docs/contributing/forkandpr/) 21 | * Templates: 22 | - For [patterns](/docs/contributing/templates/patterns/) 23 | - For [guidelines](/docs/contributing/templates/guidelines/) 24 | * [Understanding the Approval Process](/docs/contributing/theapprovalprocess/) 25 | 26 | Here are some [tips and tricks in terms of working with Markdown and Hugo](/docs/contributing/formattingtips/). 27 | 28 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/2-anti-patterns/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | chapter = true 3 | title = "2. Anti-Patterns" 4 | weight = 130 5 | tags = ["C/AL"] 6 | +++ 7 | Some of the software development practices, had **not** stood the test of time. Despite that, some are still being used today by developers everywhere. 8 | 9 | "An **anti-pattern** (or **antipattern**) is a common response to a recurring problem that is usually ineffective and risks being highly counterproductive" (from [Wikipedia][anchor0]) 10 | 11 | Since almost the beginning of the NAV Design Patterns project, we talked about documenting the anti-patterns - but never found the time. Until, spontaneously, the April 1st 2015 article had practically wrote itself in a couple of hours, with priceless contributions coming from Andreas, Elly, Nikola - and last but not least, waldo. 12 | 13 | Best regards, 14 | 15 | Bogdana Botez 16 | 17 | 18 | 19 | [anchor0]: http://en.wikipedia.org/wiki/Anti-pattern 20 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/2-anti-patterns/nav-upgrade/upgrade.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/2-anti-patterns/nav-upgrade/upgrade.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | chapter = true 3 | title = "3. CAL Coding Guidelines" 4 | weight = 150 5 | tags = ["C/AL"] 6 | categories = ["Best Practice"] 7 | +++ 8 | We've decided to publish our current C/AL coding guidelines. They are actual, as per January 2015 when this is published (but might fall out of sync as time goes by). 9 | 10 | You can also [download the C/AL coding guidelines as pdf,][anchor0] all in one document. In contrast, on this wiki, the coding guidelines are published individually. The reason is: give you the chance to comment and share your oppinion on each one. Thanks to [waldo][anchor1] for this idea and for helping out. 11 | 12 | The guidelines are debatable - and it is good when they are generating debate. There is variation of opinion on the rules at Microsoft too. The plan is to simply expose what we use now. And more important, to say that guidelines could be used. Debate on individual guidelines can become heated for any programming language, but the benefit of using some guidelines stays. 13 | 14 | For us, those guidelines are enforced at check-in time - we are using a tool which verifies and only allows compliant check-ins. While this tool is internal and not ready to publish, we had anyways decided to open up and present the rules we use to the community, as inspiration. 15 | 16 | Question: Since we're having the guidelines, how come there is still C/AL code in NAV which doesn't respect them? 17 | 18 | Answer: all new C/AL code is bound to follow the guidelines (else it cannot be checked-in). However, the code that existed before the rules - it does not. We had done cleanup in a certain degree. Now we're gradually improving the old code base as we visit various objects in order to add new functionality, however chances are that code we didn't touch in a long time had remained in its old form. 19 | 20 | We're looking forward to your comments. Where you can, do provide concrete examples of the alternatives, Good and Bad. 21 | 22 | {{< youtube z6skKy0pkmU >}} 23 | 24 | 25 | 26 | [anchor0]: https://blogs.msdn.microsoft.com/nav/2015/01/09/cal-coding-guidelines-used-at-microsoft-development-center-copenhagen "download the C/AL coding guidelines as pdf" 27 | [anchor1]: /members/waldo/default.aspx "waldo" 28 | [anchor2]: https://www.youtube.com/watch?v=z6skKy0pkmU&list=PLhZ3P-LY7CqmVszuvtJLujFyHpsVN0U_w&index=26 29 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/design/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Design" 3 | weight = 490 4 | tags = ["C/AL"] 5 | categories = ["Best Practice"] 6 | +++ 7 | ## C/AL Coding Guidelines 8 | 9 | ## **Design** 10 | 11 | Find the C/AL guidelines by expanding the menu in the left. 12 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/design/by-reference-parameters/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "By Reference Parameters" 3 | weight = 280 4 | tags = ["C/AL"] 5 | categories = ["Best Practice"] 6 | +++ 7 | Do not declare parameters by reference if their values are not intended to be changed. 8 | 9 | Unintentional value changes might propagate. Also, it might lead people to believe that value changes are intended. 10 | 11 | Bad code 12 | 13 | LOCAL PROCEDURE ShowMessage@15(VAR Text@1000 : Text[250]); 14 | BEGIN 15 | Text := GetMessageText; 16 | IF (Text <> '') AND GenJnlLineInserted THEN 17 | MESSAGE(Text); 18 | END; 19 | 20 | Good code 21 | 22 | LOCAL PROCEDURE ShowMessage@15(Text@1000 : Text[250]); 23 | BEGIN 24 | Text := GetMessageText; 25 | IF (Text <> '') AND GenJnlLineInserted THEN 26 | MESSAGE(Text); 27 | END; 28 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/design/class-coupling/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Class Coupling" 3 | weight = 320 4 | tags = ["C/AL"] 5 | categories = ["Best Practice"] 6 | +++ 7 | Do not write functions that have high class coupling. This makes the code hard to maintain. 8 | 9 | Bad code 10 | 11 | Any procedure / trigger that has class coupling of > 30 12 | 13 | 14 | 15 | Good code 16 | 17 | Any procedure / trigger that has class coupling of <= 30\. 18 | Class coupling is computed by summing the unique instances of the following in a code block: 19 | - every unique usage of a complex C/AL data type (table, codeunit, etc) as 1\. 20 | - every unique usage of a DotNet type as 1\. 21 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/design/cyclomatic-complexity/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Cyclomatic Complexity" 3 | weight = 460 4 | tags = ["C/AL"] 5 | categories = ["Best Practice"] 6 | +++ 7 | Do not write functions that have high cyclomatic complexity. This makes the code hard to maintain. 8 | 9 | Bad code 10 | 11 | Any procedure / trigger that has a cyclomatic complexity > 25, using the CC3 version mentioned in [this article][anchor0]. 12 | 13 | 14 | 15 | Good code 16 | 17 | Any procedure / trigger that has a cyclomatic complexity <= 25, using the CC3 version. 18 | The CC3 version is computed by summing the following in a code block: 19 | - each IF statement as 1\. 20 | - each entire CASE as 1\. 21 | 22 | 23 | 24 | [anchor0]: http://www.aivosto.com/project/help/pm-complexity.html 25 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/design/encapsulate-local-functionality/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Encapsulate Local Functionality" 3 | weight = 530 4 | tags = ["C/AL"] 5 | categories = ["Best Practice"] 6 | +++ 7 | Any function used local must be defined as local. 8 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/design/findset-findfirst-findlast/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "FINDSET FINDFIRST FINDLAST" 3 | weight = 600 4 | tags = ["C/AL"] 5 | categories = ["Best Practice"] 6 | +++ 7 | FINDSET, FIND('+') or FIND('-') should only be used when NEXT is used and vice versa. 8 | 9 | Bad code 10 | 11 | IF Cust.FIND('-') THEN 12 | ERROR(CustIsBlockErr) 13 | 14 | Good code 15 | 16 | IF Cust.FINDFIRST THEN 17 | ERROR(CustIsBlockErr) 18 | 19 | Bad code 20 | 21 | IF Cust.FINDFIRST THEN 22 | REPEAT 23 | ... 24 | UNTIL Cust.NEXT = 0; 25 | 26 | Good code 27 | 28 | IF Cust.FINDSET THEN 29 | REPEAT 30 | ... 31 | UNTIL Cust.NEXT = 0; 32 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/design/initialized-variables/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Initialized Variables" 3 | weight = 660 4 | tags = ["C/AL"] 5 | categories = ["Best Practice"] 6 | +++ 7 | Variables should always be set to a specific value, before they are used. 8 | 9 | Bad code 10 | 11 | PROCEDURE SetPurchLine@22(VAR CurrentPurchLine@1000 : Record 39); 12 | VAR 13 | Pegging@1001 : Boolean; 14 | BEGIN 15 | IF Pegging THEN 16 | CurrQuantity := CurrentPurchLine."Quantity (Base)" 17 | ELSE 18 | CurrQuantity := CurrentPurchLine."Outstanding Qty. (Base)"; 19 | END; 20 | 21 | Good code 22 | 23 | PROCEDURE SetPurchLine@22(VAR CurrentPurchLine@1000 : Record 39); 24 | VAR 25 | Pegging@1001 : Boolean; 26 | BEGIN 27 | Pegging := IsPegging(CurrentPurchLine); 28 | IF Pegging THEN 29 | CurrQuantity := CurrentPurchLine."Quantity (Base)" 30 | ELSE 31 | CurrQuantity := CurrentPurchLine."Outstanding Qty. (Base)"; 32 | END; 33 | 34 | Bad code 35 | 36 | // In the example below, the function will always return FALSE. 37 | PROCEDURE GetItemsToPlan@22() : Boolean; 38 | BEGIN 39 | SETRANGE("Document Type","Document Type"::Order); 40 | ... 41 | FINDSET 42 | END; 43 | 44 | Good code 45 | 46 | PROCEDURE GetItemsToPlan@22() : Boolean; 47 | BEGIN 48 | SETRANGE("Document Type","Document Type"::Order); 49 | ... 50 | EXIT(FINDSET) 51 | END; 52 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/design/maintainability-index/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Maintainability Index" 3 | weight = 770 4 | tags = ["C/AL"] 5 | categories = ["Best Practice"] 6 | +++ 7 | [Maintainability Index][anchor0]: Do not write functions that have a very low maintainability index. This makes the code hard to maintain. 8 | 9 | Bad code 10 | 11 | Any procedure / trigger that has a maintainability index < 20 12 | 13 | 14 | 15 | Good code 16 | 17 | Any procedure / trigger that has a maintainability index >= 20\. 18 | The Maintainability Index is computed as a function: 19 | - Lines Of Code (inverse proportional) 20 | - the Halstead Volume 21 | - Cyclomatic Complexity (inverse proportional). 22 | 23 | More info 24 | 25 | * [Halstead Volume][anchor1] 26 | * [Cyclomatic Complexity][anchor2] 27 | 28 | Bad code 29 | 30 | Any procedure / trigger that is > 100 lines of code 31 | 32 | 33 | 34 | Good code 35 | 36 | Any procedure / trigger that is <= 100 lines of code. 37 | A full C/AL Statement counts as 1 line of code 38 | 39 | 40 | 41 | [anchor0]: http://blogs.msdn.com/b/codeanalysis/archive/2007/11/20/maintainability-index-range-and-meaning.aspx 42 | [anchor1]: http://en.wikipedia.org/wiki/Halstead_complexity_measures 43 | [anchor2]: http://www.aivosto.com/project/help/pm-complexity.html 44 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/design/parameter-placeholders/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Parameter Placeholders" 3 | weight = 920 4 | tags = ["C/AL"] 5 | categories = ["Best Practice"] 6 | +++ 7 | The number of parameters passed to a string must match the placeholders. 8 | 9 | Bad code 10 | 11 | CannotDeleteLineErr@1005 : TextConst 'ENU=You cannot delete this line because one or more rating values exists.'; 12 | ... 13 | ERROR(CannotDeleteLineErr,TABLECAPTION); 14 | 15 | Good code 16 | 17 | CannotDeleteLineErr@1005 : TextConst 'ENU=You cannot delete this line because one or more rating values exists.'; 18 | ... 19 | ERROR(CannotDeleteLineErr); 20 | 21 | 22 | 23 | Bad code 24 | 25 | CannotUseThisFieldErr@1020 : TextConst 'ENU=You cannot use this field for %2 fields.'; 26 | ... 27 | ERROR(CannotUseThisFieldErr,0,Field.Class); 28 | 29 | Good code 30 | 31 | CannotUseThisFieldErr@1020 : TextConst 'ENU=You cannot use this field for %1 fields.'; 32 | ... 33 | ERROR(CannotUseThisFieldErr,Field.Class); 34 | 35 | ### 36 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/design/static-object-invocation/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Static Object Invocation" 3 | weight = 1160 4 | tags = ["C/AL"] 5 | categories = ["Best Practice"] 6 | +++ 7 | Call objects statically whenever possible. It reduces extra noise and removes extra variables. Downside: changing the name of the object which is called statically will need a code update. 8 | 9 | Bad code 10 | 11 | LOCAL PROCEDURE Code@1(); 12 | VAR 13 | CAJnlPostBatch@1001 : Codeunit 1103; 14 | BEGIN 15 | CAJnlPostBatch.Run(CostJnlLine); 16 | END; 17 | 18 | Good code 19 | 20 | LOCAL PROCEDURE Code@1(); 21 | BEGIN 22 | CODEUNIT.RUN(CODEUNIT::"CA Jnl.-Post Batch",CostJnlLine); 23 | END; 24 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/design/unreachable-code/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Unreachable Code" 3 | weight = 1310 4 | tags = ["C/AL"] 5 | categories = ["Best Practice"] 6 | +++ 7 | Do not write code that will never be hit. 8 | 9 | It affects code readability and can lead to wrong assumptions. 10 | 11 | Bad code 12 | 13 | IF Type <> Type::FIELD THEN BEGIN 14 | ... 15 | ERROR(...); 16 | RecRef.CLOSE; 17 | END; 18 | 19 | 20 | 21 | Good code 22 | 23 | IF Type <> Type::FIELD THEN BEGIN 24 | ... 25 | RecRef.CLOSE; 26 | ERROR(...); 27 | END; 28 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/design/unused-initialized-variables/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Unused Initialized Variables" 3 | weight = 1320 4 | tags = ["C/AL"] 5 | categories = ["Best Practice"] 6 | +++ 7 | The value assigned to a variable must be used. Else the variable is not necessary. 8 | 9 | Bad code 10 | 11 | PROCEDURE AddEntities@1(FilterStr@1000 : Text[250]); 12 | VAR 13 | Vendor@1001 : Record 23; 14 | Count@1002 : Integer; 15 | BEGIN 16 | Count := 0; 17 | Vendor.SETFILTER("No.",FilterStr); 18 | IF Vendor.FINDSET THEN 19 | REPEAT 20 | "User ID" := USERID; 21 | "Vendor No." := Vendor."No."; 22 | IF INSERT THEN 23 | Count += 1; 24 | UNTIL Vendor.NEXT = 0; 25 | END; 26 | 27 | Good code 28 | 29 | PROCEDURE AddEntities@1(FilterStr@1000 : Text[250]); 30 | VAR 31 | Vendor@1001 : Record 23; 32 | BEGIN 33 | Vendor.SETFILTER("No.",FilterStr); 34 | IF Vendor.FINDSET THEN 35 | REPEAT 36 | "User ID" := USERID; 37 | "Vendor No." := Vendor."No."; 38 | IF INSERT THEN; 39 | UNTIL Vendor.NEXT = 0; 40 | END; 41 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/design/unused-variables/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Unused Variables" 3 | weight = 1330 4 | tags = ["C/AL"] 5 | categories = ["Best Practice"] 6 | +++ 7 | Do not declare variables that are unused. 8 | 9 | Unused variables affect readability. 10 | 11 | Bad code 12 | 13 | PROCEDURE CheckPostingDate@23(CaptionEntryNo@1005 : Text[50]); 14 | BEGIN 15 | IF GenJnlCheckLine.DateNotAllowed(PostingDate) THEN 16 | ERROR(DateNotAllowedErr,Caption,EntryNo) 17 | IF PostingDate > MaxPostingDate THEN 18 | MaxPostingDate := PostingDate; 19 | END 20 | 21 | Good code 22 | 23 | PROCEDURE CheckPostingDate@23(); 24 | BEGIN 25 | IF GenJnlCheckLine.DateNotAllowed(PostingDate) THEN 26 | ERROR(DateNotAllowedErr,Caption,EntryNo); 27 | IF PostingDate > MaxPostingDate THEN 28 | MaxPostingDate := PostingDate; 29 | END; 30 | 31 | Bad code 32 | 33 | PROCEDURE IsReturned@14(EntryNo@1002 : Integer) : Decimal; 34 | VAR 35 | ItemEntry@1000 : Record 32; 36 | Quantity@1003 : Integer; 37 | BEGIN 38 | EXIT(-OutboundApplied(EntryNo,TRUE) - InboundApplied(EntryNo,TRUE)); 39 | END; 40 | 41 | Good code 42 | 43 | PROCEDURE IsReturned@14(EntryNo@1002 : Integer) : Decimal; 44 | BEGIN 45 | EXIT(-OutboundApplied(EntryNo,TRUE) - InboundApplied(EntryNo,TRUE)); 46 | END; 47 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/design/variable-capacity-mismatch/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Variable Capacity Mismatch" 3 | weight = 1410 4 | tags = ["C/AL"] 5 | categories = ["Best Practice"] 6 | +++ 7 | Do not assign a value to a variable whose capacity is smaller. 8 | 9 | It will throw an error at runtime. 10 | 11 | Bad code 12 | 13 | FileName@1010 : Text[250]; 14 | ... 15 | UploadedFileName@1016 : Text[1024]; 16 | ... 17 | FileName := UploadedFileName; 18 | 19 | Good code 20 | 21 | FileName@1010 : Text[1024]; 22 | ... 23 | UploadedFileName@1016 : Text[1024]; 24 | ... 25 | FileName := UploadedFileName; 26 | 27 | Bad code 28 | 29 | FileName@1010 : Text[250]; 30 | ... 31 | UploadedFileName@1016 : Text[1024]; 32 | ... 33 | FileName := UploadedFileName; 34 | 35 | Good code 36 | 37 | FileName@1010 : Text[250]; 38 | ... 39 | UploadedFileName@1016 : Text[1024]; 40 | ... 41 | FileName := COPYSTR(UploadedFileName,1,250); // In case only the first 250 chars are needed. Similar for fields 42 | 43 | Bad code 44 | 45 | VAR 46 | ExceededNumberTxt@001 : 'ENU=Warning: Exceeded number of unsent documents/requests' 47 | Subject@1002 : Text[50]; 48 | ... 49 | BEGIN 50 | ... 51 | Subject := ExceededNumberTxt; 52 | 53 | Good code 54 | 55 | VAR 56 | ExceededNumberTxt@001 : 'ENU=Warning: Exceeded number of unsent documents/requests' 57 | Subject@1002 : Text[100]; 58 | ... 59 | BEGIN 60 | ... 61 | Subject := ExceededNumberTxt'; 62 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/design/with-scope-name-collision/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "WITH Scope Name Collision" 3 | weight = 1450 4 | tags = ["C/AL"] 5 | categories = ["Best Practice"] 6 | +++ 7 | Do not use the WITH scope when it has a variable whose name is the same as a local variable. This can lead to wrong code assumptions. 8 | 9 | **Given that** 10 | "Contract Type" is a field on table ServiceContractHeader, then in the following example there is a parameter name clash with the field name. Which one will be used? 11 | 12 | Bad code 13 | 14 | PROCEDURE InsertData@1("Contract Type"@1000 : Option...); 15 | ... 16 | BEGIN 17 | ... 18 | WITH ServiceContractHeader DO BEGIN 19 | ... 20 | DimMgt.InsertServContractDim(...,"Contract Type","Contract No.",0,...); 21 | END; 22 | 23 | Good code 24 | 25 | PROCEDURE InsertData@1(ContractType@1000 : Option...); 26 | ... 27 | BEGIN 28 | ... 29 | WITH ServiceContractHeader DO BEGIN 30 | ... 31 | DimMgt.InsertServContractDim(...,ContractType,"Contract No.",0,...); 32 | END; 33 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/internationalization/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Internationalization" 3 | weight = 700 4 | tags = ["C/AL"] 5 | categories = ["Best Practice"] 6 | +++ 7 | ## C/AL Coding Guidelines 8 | 9 | ## **Internationalization** 10 | 11 | 12 | Find the C/AL guidelines by expanding the menu in the left. 13 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/internationalization/using-calcdate/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Using Calcdate" 3 | weight = 1370 4 | tags = ["C/AL"] 5 | categories = ["Best Practice"] 6 | +++ 7 | CALCDATE should only be used with DateFormula variables. Alternatively the string should be enclosed using the <> symbols. 8 | 9 | Bad code 10 | 11 | IF ReservEntry."Expected Receipt Date" > 12 | CALCDATE('-' + FORMAT("Dampener (Time)") + FirstDate) 13 | THEN 14 | 15 | Good code 16 | 17 | IF ReservEntry."Expected Receipt Date" > 18 | CALCDATE('<-' + FORMAT("Dampener (Time)") + FirstDate + '>') 19 | THEN 20 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/localizability/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Localizability" 3 | weight = 750 4 | tags = ["C/AL"] 5 | categories = ["Best Practice"] 6 | +++ 7 | ## C/AL Coding Guidelines 8 | 9 | ## **Localizability** 10 | 11 | Find the C/AL guidelines by expanding the menu in the left. 12 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/localizability/captionml-for-system-tables/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "CaptionML on System Pages" 3 | weight = 300 4 | tags = ["C/AL"] 5 | categories = ["Best Practice"] 6 | +++ 7 | CaptionML should always be specified on a page field for a system table. By default, system tables do not have captions, so if you need to use them in the UI then captions need to be added. 8 | 9 | Bad code 10 | 11 | ... 12 | { 2 ;2 ;Field ; 13 | SourceExpr=Name } 14 | ... 15 | OBJECT Table 2000000000 User 16 | ... 17 | { 2 ; ;Name ;Text50 } 18 | 19 | Good code 20 | 21 | ... 22 | { 2 ;2 ;Field ; 23 | CaptionML=ENU=Name; 24 | SourceExpr=Name } 25 | ... 26 | OBJECT Table 2000000000 User 27 | ... 28 | { 2 ; ;Name ;Text50 } 29 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/localizability/fieldcaption-and-tablecaption/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "FIELDCAPTION and TABLECAPTION" 3 | weight = 580 4 | tags = ["C/AL"] 5 | categories = ["Best Practice"] 6 | +++ 7 | For user messages, errors etc., use FIELDCAPTION not FIELDNAME and TABLECAPTION not TABLENAME. 8 | 9 | Reason: 10 | 11 | 1. The correct translation will be automatically used. 12 | 2. If the caption/name changes, then there will be a single point of change needed. 13 | 14 | Bad code 15 | 16 | ```al 17 | IF NOT CONFIRM(UpdateLocationQst,TRUE,FIELDNAME("Location Code"),...) 18 | ``` 19 | 20 | Good code 21 | 22 | ```al 23 | IF NOT CONFIRM(UpdateLocationQst,TRUE,FIELDCAPTION("Location Code"),...) 24 | ``` 25 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/localizability/global-text-constants/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Global Text Constants" 3 | weight = 610 4 | tags = ["C/AL"] 5 | categories = ["Best Practice"] 6 | +++ 7 | Declare Text Constant as global variables. 8 | 9 | Bad code 10 | 11 | ```al 12 | PROCEDURE GetRequirementText@6(...) : Text[50]; 13 | VAR 14 | RequirementOptionsTxt@1002 : TextConst 'ENU=Shipment,Receive,Pick,Put-Away'; 15 | BEGIN 16 | ``` 17 | 18 | Good code 19 | 20 | ```al 21 | VAR 22 | RequirementOptionsTxt@1002 : TextConst 'ENU=Shipment,Receive,Pick,Put-Away'; 23 | ... 24 | PROCEDURE GetRequirementText@6(...) : Text[50]; 25 | BEGIN 26 | ``` 27 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/localizability/use-text-constants/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Use Text Constants" 3 | weight = 1360 4 | tags = ["C/AL"] 5 | categories = ["Best Practice"] 6 | +++ 7 | Pass user messages using Text Constants. It makes translation easy. 8 | 9 | Bad code 10 | 11 | ```al 12 | ImportAttachmentQst@1021 : TextConst 'ENU="Import attachment "'; 13 | ... 14 | IF CONFIRM(ImportAttachmentQst + Caption +'?',TRUE) THEN BEGIN 15 | ``` 16 | 17 | Good code 18 | 19 | ```al 20 | ImportAttachmentQst@1021 : TextConst 'ENU="Import attachment %1?"'; 21 | ... 22 | IF CONFIRM(STRSUBSTNO(ImportAttachmentQst, Caption),TRUE) THEN BEGIN 23 | ``` 24 | 25 | Bad code 26 | 27 | ```al 28 | ... 29 | IF NOT 30 | CONFIRM( 31 | STRSUBSTNO( 32 | 'Difference on Periodic entries: %1 on %2' + 33 | 'Do you want to continue?',Balance,Date), 34 | TRUE) 35 | THEN 36 | ERROR('Program terminated by the user'); 37 | ``` 38 | 39 | Good code 40 | 41 | ```al 42 | DiffOnPeriodEntiesQst@100 : TextConst 'ENU="Difference on Periodic entries: %1 on %2\\ Do you want to continue?"'; 43 | ProgramTerminatedErr@200 : TextConst 'ENU="Program terminated by the user"'; 44 | ... 45 | IF NOT CONFIRM(STRSUBSTNO(DiffOnPeriodEntiesQst,Balance,Date),TRUE) THEN 46 | ERROR(ProgramTerminatedErr); 47 | ``` 48 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/localizability/using-optioncaptionml/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Using OptionCaptionML" 3 | weight = 1380 4 | tags = ["C/AL"] 5 | categories = ["Best Practice"] 6 | +++ 7 | The OptionCaptionML should be filled in for sourceexpression using option data types. 8 | 9 | Bad code 10 | 11 | { 30 ;TextBox ;17850;0 ;150 ;423 ;Name=Selection; 12 | SourceExpr=Selection; 13 | DataSetFieldName=Selection } 14 | ... 15 | Selection@1008 : 'Open,Closed,Open and Closed'; 16 | ... 17 | 18 | Good code 19 | 20 | { 30 ;TextBox ;17850;0 ;150 ;423 ;Name=Selection; 21 | OptionCaptionML=ENU=Open,Closed,Open and Closed; 22 | SourceExpr=Selection; 23 | DataSetFieldName=Selection } 24 | ... 25 | Selection@1008 : 'Open,Closed,Open and Closed'; 26 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/readability/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Readability" 3 | weight = 980 4 | tags = ["C/AL","Readability"] 5 | categories = ["Best Practice"] 6 | +++ 7 | ## C/AL Coding Guidelines 8 | 9 | ## **Readability** 10 | 11 | Generally, all readability rules are Microsoft style choices only. You can use them to keep consistency with the existing code. 12 | 13 | Find the C/AL guidelines by expanding the menu in the left. 14 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/readability/begin-as-an-afterword/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Begin as an 'After Word'" 3 | weight = 230 4 | tags = ["C/AL","Readability"] 5 | categories = ["Best Practice"] 6 | +++ 7 | When BEGIN follows THEN, ELSE, DO, it should be on the same line, preceded by one space character. 8 | 9 | Bad code 10 | 11 | ```al 12 | IF ICPartnerRefType = ICPartnerRefType::"Common Item No." THEN 13 | BEGIN 14 | ... 15 | END; 16 | ``` 17 | 18 | Good code 19 | 20 | ``` 21 | IF ICPartnerRefType = ICPartnerRefType::"Common Item No." THEN BEGIN 22 | ... 23 | END; 24 | ``` 25 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/readability/begin-end/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Begin-End - Compound Only" 3 | weight = 240 4 | tags = ["C/AL","Readability"] 5 | categories = ["Best Practice"] 6 | +++ 7 | Only use BEGIN..END to enclose compound statements. 8 | 9 | Bad code 10 | 11 | ```al 12 | IF FINDSET THEN BEGIN 13 | REPEAT 14 | ... 15 | UNTIL NEXT = 0; 16 | END; 17 | ``` 18 | 19 | Good code 20 | 21 | ```al 22 | IF FINDSET THEN 23 | REPEAT 24 | ... 25 | UNTIL NEXT = 0; 26 | ``` 27 | 28 | Bad code 29 | 30 | ```al 31 | IF IsAssemblyOutputLine THEN BEGIN 32 | TESTFIELD("Order Line No.",0); 33 | END; 34 | ``` 35 | 36 | Good code 37 | 38 | ```al 39 | IF IsAssemblyOutputLine THEN 40 | TESTFIELD("Order Line No.",0); 41 | ``` 42 | 43 | Bad code 44 | 45 | ```al 46 | IF FINDSET THEN 47 | REPEAT 48 | BEGIN 49 | ... 50 | END; 51 | UNTIL NEXT = 0; 52 | ``` 53 | 54 | Good code 55 | 56 | ```al 57 | IF FINDSET THEN 58 | REPEAT 59 | ... 60 | UNTIL NEXT = 0; 61 | ``` 62 | 63 | Exception 64 | 65 | ```al 66 | // Except for this case 67 | IF X THEN BEGIN 68 | IF Y THEN 69 | DO SOMETHING; 70 | END ELSE (not X) 71 | ``` 72 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/readability/binary-operator-line-start/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Binary Operator to Start Line" 3 | weight = 250 4 | tags = ["C/AL","Readability"] 5 | categories = ["Best Practice"] 6 | +++ 7 | Do not start a line with a binary operator. 8 | 9 | Bad code 10 | 11 | ```al 12 | "Quantity to Ship" := 13 | Quantity 14 | - "Quantity Shipped" 15 | ``` 16 | 17 | Good code 18 | 19 | ```al 20 | "Quantity to Ship" := 21 | Quantity - 22 | "Quantity Shipped" 23 | ``` 24 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/readability/blank-lines/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Blank Lines" 3 | weight = 260 4 | tags = ["C/AL","Readability"] 5 | categories = ["Best Practice"] 6 | +++ 7 | Do not use blank lines at the beginning or end of any functions, after BEGIN, before END, or inside multiline expressions. 8 | 9 | Bad code 10 | 11 | ```al 12 | PROCEDURE MATRIX_OnDrillDown@1133(MATRIX_ColumnOrdinal : Integer); 13 | BEGIN 14 | 15 | SetupDrillDownCol(MATRIX_ColumnOrdinal); 16 | DrillDown(FALSE,ValueType); 17 | 18 | END; 19 | ``` 20 | 21 | Good code 22 | 23 | ```al 24 | PROCEDURE MATRIX_OnDrillDown@1133(MATRIX_ColumnOrdinal : Integer); 25 | BEGIN 26 | SetupDrillDownCol(MATRIX_ColumnOrdinal); 27 | DrillDown(FALSE,ValueType); 28 | END; 29 | ``` 30 | 31 | Bad code 32 | 33 | ```al 34 | IF NameIsValid AND 35 | 36 | Name2IsValid 37 | THEN 38 | ``` 39 | 40 | Good code 41 | 42 | ```al 43 | IF NameIsValid AND 44 | Name2IsValid 45 | THEN 46 | ``` 47 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/readability/case-actions/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "CASE Action" 3 | weight = 310 4 | tags = ["C/AL","Readability"] 5 | categories = ["Best Practice"] 6 | +++ 7 | A CASE action should start on a line after the possibility. 8 | 9 | Bad code 10 | 11 | ```al 12 | CASE Letter OF 13 | 'A': Letter2 := '10'; 14 | 'B': Letter2 := '11'; 15 | ``` 16 | 17 | Good code 18 | 19 | ```al 20 | CASE Letter OF 21 | 'A': 22 | Letter2 := '10'; 23 | 'B': 24 | Letter2 := '11'; 25 | ``` -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/readability/colon-usage-in-case/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Colon usage in CASE" 3 | weight = 340 4 | tags = ["C/AL","Readability"] 5 | categories = ["Best Practice"] 6 | +++ 7 | The last possibility on a CASE statement must be immediately followed by a colon. 8 | 9 | Bad code 10 | 11 | ```al 12 | CASE DimOption OF 13 | DimOption::"Global Dimension 1" : 14 | DimValue."Dimension Code" := GLSetup."Global Dimension 1 Code"; 15 | ``` 16 | 17 | Good code 18 | 19 | ```al 20 | CASE DimOption OF 21 | DimOption::"Global Dimension 1": 22 | DimValue."Dimension Code" := GLSetup."Global Dimension 1 Code"; 23 | ``` 24 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/readability/comments-curly-brackets/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Comments inside Curly Brackets" 3 | weight = 350 4 | tags = ["C/AL","Readability"] 5 | categories = ["Best Practice"] 6 | +++ 7 | Never use curly bracket comments. During development, the "Block comment" functionality can be used instead. However, in production code, block comments are not recommended. 8 | 9 | Bad code 10 | 11 | ```al 12 | PeriodTxt: {Period} 13 | ``` 14 | 15 | Good code 16 | 17 | ```al 18 | PeriodTxt: // Period 19 | ``` 20 | 21 | 22 | Bad code 23 | 24 | ```al 25 | PROCEDURE MATRIX_OnAfterGetRecord@10(MATRIX_ColumnOrdinal : Integer); 26 | BEGIN 27 | { 28 | IF ShowColumnName THEN 29 | MatrixHeader := MatrixRecords[MATRIX_ColumnOrdinal].Name 30 | ELSE 31 | MatrixHeader := MatrixRecords[MATRIX_ColumnOrdinal].Code; 32 | } 33 | MatrixRecord := MatrixRecords[MATRIX_ColumnOrdinal]; 34 | AnalysisValue := CalcAmt(ValueType,TRUE); 35 | MATRIX_CellData[MATRIX_ColumnOrdinal] := AnalysisValue; 36 | END; 37 | ``` 38 | 39 | Good code 40 | 41 | ```al 42 | PROCEDURE MATRIX_OnAfterGetRecord@10(MATRIX_ColumnOrdinal : Integer); 43 | BEGIN 44 | MatrixRecord := MatrixRecords[MATRIX_ColumnOrdinal]; 45 | AnalysisValue := CalcAmt(ValueType,TRUE); 46 | MATRIX_CellData[MATRIX_ColumnOrdinal] := AnalysisValue; 47 | END; 48 | ``` 49 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/readability/comments-spacing/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Comment Spacing" 3 | weight = 360 4 | tags = ["C/AL","Readability"] 5 | categories = ["Best Practice"] 6 | +++ 7 | Always start comments with // followed by one space character. 8 | 9 | Bad code 10 | 11 | ```al 12 | RowNo += 1000; //Move way below the budget 13 | ``` 14 | 15 | 16 | Good code 17 | 18 | ```al 19 | RowNo += 1000; // Move way below the budget 20 | ``` 21 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/readability/end-else-pair/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "END ELSE Pair" 3 | weight = 540 4 | tags = ["C/AL","Readability"] 5 | categories = ["Best Practice"] 6 | +++ 7 | The END ELSE pair should always appear on the same line. 8 | 9 | Bad code 10 | 11 | ```al 12 | IF OppEntry.FIND('-') THEN 13 | IF SalesCycleStage.FIND('-') THEN BEGIN 14 | ... 15 | END 16 | ELSE 17 | ... 18 | ``` 19 | 20 | Good code 21 | 22 | ```al 23 | IF OppEntry.FIND('-') THEN 24 | IF SalesCycleStage.FIND('-') THEN BEGIN 25 | ... 26 | END ELSE 27 | ... 28 | ``` -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/readability/indentation/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Indentation" 3 | weight = 650 4 | tags = ["C/AL","Readability"] 5 | categories = ["Best Practice"] 6 | +++ 7 | In general, use an indentation of two space characters. Logical expressions in the IF, WHILE, and UNTIL parts are indented at least 3, 6, and 6 spaces respectively. 8 | 9 | Bad code 10 | 11 | ```al 12 | IF GLSetup."Unrealized VAT" OR 13 | (GLSetup."Prepayment Unrealized VAT" AND NewCVLedgEntryBuf.Prepayment) 14 | ``` 15 | 16 | Good code 17 | 18 | ```al 19 | IF GLSetup."Unrealized VAT" OR 20 | (GLSetup."Prepayment Unrealized VAT" AND NewCVLedgEntryBuf.Prepayment) 21 | ``` 22 | 23 | Bad code 24 | 25 | ```al 26 | IF GenJnlLine."Account No." <> ICPartner.Code THEN 27 | ICPartner.GET("Account No."); 28 | IF GenJnlLine.Amount \> 0 THEN BEGIN 29 | ... 30 | ``` 31 | 32 | Good code 33 | 34 | ```al 35 | IF GenJnlLine."Account No." <> ICPartner.Code THEN 36 | ICPartner.GET("Account No."); 37 | IF GenJnlLine.Amount > 0 THEN BEGIN 38 | ... 39 | ``` 40 | 41 | Bad code 42 | 43 | ```al 44 | Dialog.OPEN(WindowTxt + 45 | '@1@@@@@@@@@@@@@@@@@@@@@@@'); 46 | ``` 47 | 48 | Good code 49 | 50 | ```al 51 | Dialog.OPEN( 52 | WindowTxt + 53 | '@1@@@@@@@@@@@@@@@@@@@@@@@'); 54 | ``` 55 | 56 | Bad code 57 | 58 | ```al 59 | TempOldCustLedgEntry.DELETE; 60 | // Find the next old entry for application of the new entry 61 | ``` 62 | 63 | Good code 64 | 65 | ```al 66 | TempOldCustLedgEntry.DELETE; 67 | // Find the next old entry for application of the new entry 68 | ``` 69 | 70 | Bad code 71 | 72 | ```al 73 | IF NOT ("Applies-to Doc. Type" IN 74 | ["Applies-to Doc. Type"::Receipt, 75 | "Applies-to Doc. Type"::"Return Shipment"]) 76 | ``` 77 | 78 | Good code 79 | 80 | ```al 81 | IF NOT ("Applies-to Doc. Type" IN 82 | ["Applies-to Doc. Type"::Receipt, 83 | "Applies-to Doc. Type"::"Return Shipment"]) 84 | ``` 85 | 86 | Bad code 87 | 88 | ```al 89 | WHILE (RemAmt > 0) OR 90 | (RemAmtLCY > 0) 91 | DO 92 | ``` 93 | 94 | Good code 95 | 96 | ```al 97 | WHILE (RemAmt > 0) OR 98 | (RemAmtLCY > 0) 99 | DO 100 | ``` 101 | 102 | Bad code 103 | 104 | ```al 105 | UNTIL (RemAmt > 0) AND 106 | (RemAmtLCY > 0); 107 | ``` 108 | 109 | Good code 110 | 111 | ```al 112 | UNTIL (RemAmt > 0) AND 113 | (RemAmtLCY > 0) 114 | ``` 115 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/readability/keyword-pairs-indentation/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Keyword Pairs - Indentation" 3 | weight = 730 4 | tags = ["C/AL","Readability"] 5 | categories = ["Best Practice"] 6 | +++ 7 | The IF..THEN pair, WHILE..DO pair, and FOR..DO pair must appear on the same line or the same level of indentation. 8 | 9 | Bad code 10 | 11 | ```al 12 | IF (x = y) AND 13 | (a = b) THEN 14 | ``` 15 | 16 | Good code 17 | 18 | ```al 19 | IF (x = y) AND 20 | (a = b) 21 | THEN 22 | ``` 23 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/readability/line-start-keywords/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Line Start Keywords" 3 | weight = 740 4 | tags = ["C/AL","Readability"] 5 | categories = ["Best Practice"] 6 | +++ 7 | The END, IF, REPEAT, FOR, WHILE, ELSE and CASE statement should always start a line. 8 | 9 | Bad code 10 | 11 | ```al 12 | IF IsContactName THEN ValidateContactName 13 | ELSE IF IsSalespersonCode THEN ValidateSalespersonCode 14 | ELSE IF IsSalesCycleCode THEN ValidatSalesCycleCode; 15 | ``` 16 | 17 | Good code 18 | 19 | ```al 20 | IF IsContactName THEN 21 | ValidateContactName 22 | ELSE 23 | IF IsSalespersonCode THEN 24 | ValidateSalespersonCode 25 | ELSE 26 | IF IsSalesCycleCode THEN 27 | ValidatSalesCycleCode; 28 | ``` 29 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/readability/lonely-repeat/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Lonely Repeat" 3 | weight = 760 4 | tags = ["C/AL","Readability"] 5 | categories = ["Best Practice"] 6 | +++ 7 | The REPEAT statement should always be alone on a line. 8 | 9 | Bad code 10 | 11 | ```al 12 | IF ReservEntry.FINDSET THEN REPEAT 13 | 14 | ``` 15 | 16 | 17 | Good code 18 | 19 | ```al 20 | IF ReservEntry.FINDSET THEN 21 | REPEAT 22 | ``` -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/readability/named-invocations/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Named Invocations" 3 | weight = 830 4 | tags = ["C/AL","Readability"] 5 | categories = ["Best Practice"] 6 | +++ 7 | When calling an object statically use the name, not the number 8 | 9 | Bad code 10 | 11 | ```al 12 | PAGE.RUNMODAL(525,SalesShptLine) 13 | ``` 14 | 15 | 16 | Good code 17 | 18 | ```al 19 | PAGE.RUNMODAL(PAGE::"Posted Sales Shipment Lines",SalesShptLine) 20 | ``` 21 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/readability/nested-withs/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Nested WITHs" 3 | weight = 850 4 | tags = ["C/AL","Readability"] 5 | categories = ["Best Practice"] 6 | +++ 7 | Do not nest WITHs that reference different types of objects. 8 | 9 | Bad code 10 | 11 | ```al 12 | WITH PostedWhseShptLine DO BEGIN 13 | ... 14 | WITH ItemLedgEntry DO 15 | InsertBufferRec(...,"Serial No.","Lot No.",...); 16 | ... 17 | END; 18 | ``` 19 | 20 | Good code 21 | 22 | ```al 23 | WITH PostedWhseShptLine DO BEGIN 24 | ... 25 | InsertBufferRec(...,ItemLedgEntry."Serial No.",ItemLedgEntry."Lot No.",...); 26 | ... 27 | END; 28 | ``` 29 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/readability/one-statement-per-line/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "One Statement Per Line" 3 | weight = 910 4 | tags = ["C/AL","Readability"] 5 | categories = ["Best Practice"] 6 | +++ 7 | A line of code should not have more than one statement. 8 | 9 | Bad code 10 | 11 | ```al 12 | IF OppEntry.FIND('-') THEN EXIT 13 | 14 | ``` 15 | 16 | 17 | Good code 18 | 19 | ```al 20 | IF OppEntry.FIND('-') THEN 21 | EXIT 22 | 23 | ``` 24 | 25 | 26 | Bad code 27 | 28 | ```al 29 | TotalCost += Cost; TotalAmt += Amt; 30 | 31 | ``` 32 | 33 | Good code 34 | 35 | ```al 36 | TotalCost += Cost; 37 | TotalAmt += Amt; 38 | ``` 39 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/readability/separate-if-and-else/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Separate IF and ELSE" 3 | weight = 1050 4 | tags = ["C/AL","Readability"] 5 | categories = ["Best Practice"] 6 | +++ 7 | IF and ELSE statements should be on separate lines. 8 | 9 | Bad code 10 | 11 | ```al 12 | IF Atom[i+1] = '>' THEN HasLogicalOperator := TRUE ELSE BEGIN 13 | ... 14 | END; 15 | ``` 16 | 17 | Good code 18 | 19 | ```al 20 | IF Atom[i+1] = '>' THEN 21 | HasLogicalOperator := TRUE 22 | ELSE BEGIN 23 | ... 24 | END; 25 | ``` 26 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/readability/spacing-binary-operators/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Spacing Binary Operators" 3 | weight = 1120 4 | tags = ["C/AL","Readability"] 5 | categories = ["Best Practice"] 6 | +++ 7 | There must be exactly one space character on each side of a binary operator such as = + - AND OR =. The parameter comma operator however, should have no spaces. 8 | 9 | Bad code 10 | 11 | ```al 12 | "Line Discount %" := "Line Discount Amount"/"Line Value"*100 13 | ``` 14 | 15 | 16 | Good code 17 | 18 | ```al 19 | "Line Discount %" := "Line Discount Amount" / "Line Value" * 100; 20 | ``` 21 | 22 | 23 | Bad code 24 | 25 | ```al 26 | StartDate := CALCDATE('<+'+FORMAT(Days + i)+'D>', StartDate); 27 | ``` 28 | 29 | 30 | Good code 31 | 32 | ```al 33 | StartDate := CALCDATE('<+' + FORMAT(Days + i) + 'D>',StartDate); 34 | ``` 35 | 36 | 37 | Bad code 38 | 39 | ```al 40 | StartDate := 0D; // Initialize 41 | ``` 42 | 43 | 44 | Good code 45 | 46 | ```al 47 | StartDate := 0D; // Initialize 48 | ``` 49 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/readability/spacing-brackets-and/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Spacing Brackets and ::" 3 | weight = 1130 4 | tags = ["C/AL","Readability"] 5 | categories = ["Best Practice"] 6 | +++ 7 | There must be no spaces characters before and after [] dimension brackets symbols or :: option symbols. 8 | 9 | Bad code 10 | 11 | ```al 12 | A[i] [j] := Amt; 13 | ``` 14 | 15 | 16 | Good code 17 | 18 | ```al 19 | A[i][j] := Amt; 20 | ``` 21 | 22 | 23 | Bad code 24 | 25 | ```al 26 | "Currency Exchange Rate"."Fix Exchange Rate Amount" :: Currency: 27 | ``` 28 | 29 | 30 | Good code 31 | 32 | ```al 33 | "Currency Exchange Rate"."Fix Exchange Rate Amount"::Currency: 34 | ``` 35 | 36 | 37 | Bad code 38 | 39 | ```al 40 | IF FIND (Which) THEN 41 | ``` 42 | 43 | 44 | Good code 45 | 46 | ```al 47 | IF FIND(Which) THEN 48 | ``` -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/readability/spacing-unary-operators/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Spacing Unary Operators" 3 | weight = 1140 4 | tags = ["C/AL","Readability"] 5 | categories = ["Best Practice"] 6 | +++ 7 | There must be no space between a unary operator and its argument (except for the NOT keyword). 8 | 9 | Bad code 10 | 11 | ```al 12 | IF NOT(Type = Type::Item) THEN 13 | ``` 14 | 15 | 16 | Good code 17 | 18 | ```al 19 | IF NOT (Type = Type::Item) THEN 20 | ``` 21 | 22 | 23 | Bad code 24 | 25 | ```al 26 | DiscAmt := - "Discount Amount"; 27 | ``` 28 | 29 | 30 | Good code 31 | 32 | ```al 33 | DiscAmt := -"Discount Amount"; 34 | ``` 35 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/readability/temporary-variable-naming/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Temporary Variable Naming" 3 | weight = 1200 4 | tags = ["C/AL","Readability"] 5 | categories = ["Best Practice"] 6 | +++ 7 | The name of a temporary variable must be prefixed with the word Temp and not otherwise. 8 | 9 | Bad code 10 | 11 | ```al 12 | JobWIPBuffer@1002 : TEMPORARY Record 1018; 13 | ``` 14 | 15 | 16 | Good code 17 | 18 | ```al 19 | TempJobWIPBuffer@1002 : TEMPORARY Record 1018; 20 | ``` 21 | 22 | Bad code 23 | 24 | ```al 25 | TempJobWIPBuffer@1002 : Record 1018; 26 | ``` 27 | 28 | 29 | Good code 30 | 31 | ```al 32 | CopyOfJobWIPBuffer@1002 : Record 1018; 33 | ``` 34 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/readability/unary-operator-line-end/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Unary Operator Line End" 3 | weight = 1250 4 | tags = ["C/AL","Readability"] 5 | categories = ["Best Practice"] 6 | +++ 7 | Do not end a line with unary operator. 8 | 9 | Bad code 10 | 11 | ```al 12 | "Quantity Handled (Base)" := - 13 | "Quantity Handled (Base)"); 14 | ``` 15 | 16 | Good code 17 | 18 | ```al 19 | "Quantity Handled (Base)" := 20 | - "Quantity Handled (Base)"); 21 | ``` 22 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/readability/unnecessary-compound-parenthesis/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Unnecessary Compound Parenthesis" 3 | weight = 1260 4 | tags = ["C/AL","Readability"] 5 | categories = ["Best Practice"] 6 | +++ 7 | Use parenthesis only to enclose compound expressions inside compound expressions. 8 | 9 | Bad code 10 | 11 | ```al 12 | IF ("Costing Method" = "Costing Method"::Standard) THEN 13 | ``` 14 | 15 | 16 | Good code 17 | 18 | ```al 19 | IF "Costing Method" = "Costing Method"::Standard THEN 20 | ``` 21 | 22 | 23 | Bad code 24 | 25 | ```al 26 | ProfitPct = -(Profit) / CostAmt * 100; 27 | ``` 28 | 29 | 30 | Good code 31 | 32 | ```al 33 | ProfitPct = -Profit / CostAmt * 100; 34 | ``` 35 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/readability/unnecessary-else/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Unnecessary ELSE" 3 | weight = 1270 4 | tags = ["C/AL","Readability"] 5 | categories = ["Best Practice"] 6 | +++ 7 | ELSE should not be used when the last action in the THEN part is an EXIT, BREAK, SKIP, QUIT, ERROR. 8 | 9 | Bad code 10 | 11 | ```al 12 | IF IsAdjmtBinCodeChanged THEN 13 | ERROR(AdjmtBinCodeChangeNotAllowedErr,...) 14 | ELSE 15 | ERROR(BinCodeChangeNotAllowedErr,...); 16 | ``` 17 | 18 | Good code 19 | 20 | ```al 21 | IF IsAdjmtBinCodeChanged THEN 22 | ERROR(AdjmtBinCodeChangeNotAllowedErr,...) 23 | ERROR(BinCodeChangeNotAllowedErr,...); 24 | ``` 25 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/readability/unnecessary-function-parenthesis/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Unnecessary Function Parenthesis" 3 | weight = 1280 4 | tags = ["C/AL","Readability"] 5 | categories = ["Best Practice"] 6 | +++ 7 | Do not use parenthesis in a function call if the function does not have any parameters. 8 | 9 | Bad code 10 | 11 | ```al 12 | IF ReservMgt.IsPositive() THEN 13 | ``` 14 | 15 | 16 | Good code 17 | 18 | ```al 19 | IF ReservMgt.IsPositive THEN 20 | ``` 21 | 22 | 23 | Bad code 24 | 25 | ```al 26 | IF ChangeStatusForm.RUNMODAL() <> ACTION::Yes THEN 27 | ``` 28 | 29 | 30 | Good code 31 | 32 | ```al 33 | IF ChangeStatusForm.RUNMODAL <> ACTION::Yes THEN 34 | ``` 35 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/readability/unnecessary-separators/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Unnecessary Separators" 3 | weight = 1290 4 | tags = ["C/AL","Readability"] 5 | categories = ["Best Practice"] 6 | +++ 7 | There should be no unnecessary separators. 8 | 9 | Bad code 10 | 11 | ```al 12 | IF Customer.FINDFIRST THEN;; 13 | ``` 14 | 15 | 16 | Good code 17 | 18 | ```al 19 | IF Customer.FINDFIRST THEN; 20 | ``` 21 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/readability/unnecessary-truefalse/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Unnecessary TRUE/FALSE" 3 | weight = 1300 4 | tags = ["C/AL","Readability"] 5 | categories = ["Best Practice"] 6 | +++ 7 | Do not use TRUE or FALSE keywords unnecessarily if the expression is already an logical expression. 8 | 9 | Bad code 10 | 11 | ```al 12 | IF IsPositive() = TRUE THEN 13 | ``` 14 | 15 | 16 | Good code 17 | 18 | ```al 19 | IF IsPositive THEN 20 | ``` 21 | 22 | 23 | Bad code 24 | 25 | ``` 26 | IF Complete <> TRUE THEN 27 | ``` 28 | 29 | 30 | Good code 31 | 32 | ```al 33 | IF NOT Complete THEN 34 | ``` 35 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/readability/variable-already-scoped/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Variable Already Scoped" 3 | weight = 1400 4 | tags = ["C/AL","Readability"] 5 | categories = ["Best Practice"] 6 | +++ 7 | Do not use scope ''.'' qualifier unnecessarily when a variable is already implicitly or explicitly scoped. It keeps the code simpler. 8 | 9 | Bad code 10 | 11 | ```al 12 | ReturnRcptHeader.SETRANGE(ReturnRcptHeader."Return Order No.","Document No."); 13 | ``` 14 | 15 | 16 | Good code 17 | 18 | ```al 19 | ReturnRcptHeader.SETRANGE("Return Order No.","Document No."); 20 | ``` 21 | 22 | 23 | Bad code 24 | 25 | ```al 26 | WITH ChangeLogSetupTable DO BEGIN 27 | ... 28 | IF ChangeLogSetupTable.DELETE THEN 29 | ... 30 | END; 31 | ``` 32 | 33 | Good code 34 | 35 | ```al 36 | WITH ChangeLogSetupTable DO BEGIN 37 | ... 38 | IF DELETE THEN 39 | ... 40 | END; 41 | ``` 42 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/readability/variable-naming/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Variable Naming" 3 | weight = 1420 4 | tags = ["C/AL","Readability"] 5 | categories = ["Best Practice"] 6 | +++ 7 | Variables that refer to a C/AL object must contain the objects name, abbreviated where necessary. 8 | 9 | A variable must begin with a capital letter. 10 | 11 | Blanks, periods, and other characters (such as parentheses) that would make quotation marks around a variable necessary must be omitted. 12 | 13 | If a variable is a compound of two or more words or abbreviations, each word or abbreviation should begin with a capital letter. 14 | 15 | Bad code 16 | 17 | ```al 18 | ... 19 | WIPBuffer@1002 : Record 1018 20 | ... 21 | OBJECT Table Job WIP Buffer 22 | ``` 23 | 24 | Good code 25 | 26 | ```al 27 | ... 28 | JobWIPBuffer@1002 : Record 1018 29 | ... 30 | OBJECT Table Job WIP Buffer 31 | ``` 32 | 33 | Bad code 34 | 35 | ```al 36 | ... 37 | Postline@1004 : Codeunit 12; 38 | ... 39 | OBJECT Codeunit Gen. Jnl.-Post Line 40 | ``` 41 | 42 | Good code 43 | 44 | ```al 45 | ... 46 | GenJnlPostLine@1004 : Codeunit 12; 47 | ... 48 | OBJECT Codeunit Gen. Jnl.-Post Line 49 | ``` 50 | 51 | Bad code 52 | 53 | ```al 54 | LOCAL PROCEDURE HandleCustDebitCredit@17(...;"Amount (LCY)"@1001 : Decimal;...); 55 | BEGIN 56 | IF ((... ("Amount (LCY)" \> 0)) ...) OR 57 | ((... ("Amount (LCY)" < 0)) ...) 58 | THEN BEGIN 59 | ... 60 | ``` 61 | 62 | Good code 63 | 64 | ```al 65 | LOCAL PROCEDURE HandleCustDebitCredit@17(...;AmountLCY@1001 : Decimal;...); 66 | BEGIN 67 | IF ((... (AmountLCY \> 0)) ...) OR 68 | ((... (AmountLCY < 0)) ...) 69 | THEN BEGIN 70 | ... 71 | ``` 72 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/readability/variables-declarations-order/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Variables Declarations Order" 3 | weight = 1430 4 | tags = ["C/AL","Readability"] 5 | categories = ["Best Practice"] 6 | +++ 7 | Variables declarations should be ordered by type. In general, object and complex variable types are listed first followed by simple variables. The order should be the same as the object list in the object designer for C/AL objects. Afterwards come the complex variables like RecordRef, .NET, FieldRef etc. At the end come all the simple data types in no particular order. 8 | 9 | Bad code 10 | 11 | ```al 12 | StartingDateFilter@1002 : Text[30]; 13 | Vend@1003 : Record 23; 14 | ``` 15 | 16 | Good code 17 | 18 | ```al 19 | Vend@1003 : Record 23; 20 | StartingDateFilter@1002 : Text[30]; 21 | ``` 22 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/ux/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "UX" 3 | weight = 1390 4 | tags = ["C/AL"] 5 | categories = ["Best Practice"] 6 | +++ 7 | ## C/AL Coding Guidelines 8 | 9 | ## **User eXperience** 10 | 11 | Find the C/AL guidelines by expanding the menu in the left. 12 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/ux/actions-images/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Actions - Images" 3 | weight = 200 4 | tags = ["C/AL"] 5 | categories = ["Best Practice"] 6 | +++ 7 | All actions must have an image assigned to them. 8 | 9 | Bad code 10 | 11 | ```al 12 | { 7 ;1 ;Action ; 13 | CaptionML=ENU=Customer - &Balance; 14 | RunObject=Report 121 } 15 | ``` 16 | 17 | Good code 18 | 19 | ```al 20 | { 7 ;1 ;Action ; 21 | CaptionML=ENU=Customer - &Balance; 22 | RunObject=Report 121 } 23 | Image=Report } 24 | ``` 25 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/ux/confirm/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "CONFIRM" 3 | weight = 380 4 | tags = ["C/AL"] 5 | categories = ["Best Practice"] 6 | +++ 7 | Always end CONFIRM with a question mark. 8 | 9 | Bad code 10 | 11 | ```al 12 | ChangeAllOpenedEntriesQst@1000 : TextConst 'ENU=Do you want to change all open entries for every customer and vendor that are not blocked'; 13 | ... 14 | IF CONFIRM(ChangeAllOpenedEntriesQst,TRUE) THEN 15 | ``` 16 | 17 | Good code 18 | 19 | ```al 20 | ChangeAllOpenedEntriesQst@1000 : TextConst 'ENU=Do you want to change all open entries for every customer and vendor that are not blocked?'; 21 | ... 22 | IF CONFIRM(ChangeAllOpenedEntriesQst,TRUE) THEN 23 | ``` 24 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/ux/fielderror/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "FIELDERROR" 3 | weight = 590 4 | tags = ["C/AL"] 5 | categories = ["Best Practice"] 6 | +++ 7 | Never use FIELDERROR with a period as it is automatically inserted. 8 | 9 | Bad code 10 | 11 | ```al 12 | InvalidValue@1025 : TextConst 'ENU=is invalid.'; 13 | ... 14 | Cust.FIELDERROR("No.",InvalidValue); 15 | ``` 16 | 17 | Good code 18 | 19 | ```al 20 | InvalidValue@1025 : TextConst 'ENU=is invalid'; 21 | ... 22 | Cust.FIELDERROR("No.",InvalidValue); 23 | ``` 24 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/3-cal-coding-guidelines/ux/message-and-error/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "MESSAGE and ERROR" 3 | weight = 790 4 | tags = ["C/AL"] 5 | categories = ["Best Practice"] 6 | +++ 7 | Always end MESSAGE or ERROR with a period. 8 | 9 | Bad code 10 | 11 | ```al 12 | CustIsBlockedErr@1025 : TextConst 'ENU=You cannot %1 this type of document when Customer %2 is blocked with type %3'; 13 | ... 14 | ERROR(CustIsBlockedErr,...); 15 | ``` 16 | 17 | Good code 18 | 19 | ```al 20 | CustIsBlockedErr@1025 : TextConst 'ENU=You cannot %1 this type of document when Customer %2 is blocked with type %3.'; 21 | ... 22 | ERROR(CustIsBlockedErr,...); 23 | ``` 24 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/4-get-involved/code-of-conduct/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Code of Conduct" 3 | weight = 330 4 | tags = ["C/AL"] 5 | +++ 6 | Find below the rules to be used when disseminating or relating to the NAV Design Patterns. 7 | 8 | 1. Only use materials published in text on the NAV Design Patterns Wiki site. If you received from us, any unpublished materials, please observe that they are subject to change and have not been approved for external use. 9 | 2. When referencing a NAV Design Pattern, you must remember to also reference its author and company where the author is employed. You will find the author and his/her company at the beginning of each pattern, under the title. 10 | 3. When referencing a NAV Design Patterns project, you must make it clear that this is a community project, driven by Microsoft, with multiple developers involved from both Microsoft and the community. 11 | 4. When using published text content of NAV Design Patterns, do not alter the text in any way that was published on the Wiki site, unless is has been reviewed by the patterns team and signed off by someone at Microsoft in writing. 12 | 5. If you have other materials which have not received explicit signoff in writing from me, where I have specifically stated that they are valid design patterns ready for publishing, please do not name them "NAV Design Patterns" (or anything similar). You are free to use your own content, but do not associate it in any way with NAV Design Patterns unless it is signed off in writing. 13 | 6. If you do choose to use your own content, you must make it clear that it is not a NAV Design Pattern. 14 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/4-get-involved/template-for-writing-nav-design-patterns/PatternLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/4-get-involved/template-for-writing-nav-design-patterns/PatternLogo.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/4-get-involved/template-for-writing-nav-design-patterns/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Template for writing Nav Design Patterns" 3 | weight = 1180 4 | tags = ["C/AL"] 5 | +++ 6 | This is a guideline, some parts are optional (if there's no content, remove the whole paragraph). 7 | 8 | <_Your name here in italics, plus your company name_\> 9 | 10 | ## **<\>** 11 | 12 | Short, descriptive and easy to remember. 13 | 14 | ## **Pattern Logo** 15 | 16 | Black & white, no text on it. 17 | 18 | [![ ][image0]][anchor0] 19 | 20 | **Context**: Sets the stage where the pattern takes place. 1-2 sentences. 21 | 22 | **Problem**: What happens before this pattern is used? How can it go wrong? 1-5 lines. 23 | 24 | **Forces:** (explain why the problem is difficult to solve; state the considerations that must be taken into account when choosing a solution to a problem) 25 | 26 | * <<**Force 1: **short description (What is the impact of not using this pattern? Or using only partially?) \>\> 27 | * <<**Force 2: **short description \>\> 28 | * ... 29 | 30 | **Solution:** 1-2 sentences. The full description will come below. 31 | 32 | <\> 33 | 34 | <\> 35 | 36 | **Usage**: <\> 37 | 38 | <\> 39 | 40 | <\> 41 | 42 | **Benefits:** 43 | 44 | * **<< Benefit 1: **solves Force 1, short description\>\> 45 | * **<< Benefit 2: **solves Force 2, short description\>\> 46 | * ... 47 | 48 | **Consequences:** 49 | 50 | * **<\>** 51 | * **...** 52 | 53 | **List of references** 54 | 55 | 56 | 57 | [anchor0]: PatternLogo.png 58 | 59 | 60 | [image0]: PatternLogo.png 61 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "NAV Patterns Archive" 3 | weight = 20 4 | tags = ["C/AL"] 5 | +++ 6 | 7 | ## About the archive 8 | 9 | This section of the site is a careful reproduction of the content of the Original Microsoft Community NAV Design Patterns project, created with permission. 10 | 11 | ## Reading the archive 12 | 13 | Bear in mind, many of the style and formatting guidelines in this section have been brought forward into: 14 | - The automatic formatting provided by the AL Extension 15 | - The Code Analyzers 16 | 17 | Additionally, a variety of topics around the Windows Client and DotNet are outdated, and should only be used for either reference or if working in older environments. -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "1. Patterns" 3 | weight: 110 4 | tags: ["C/AL"] 5 | categories: ["Pattern"] 6 | description: > 7 | Patterns described to be used with Microsoft Dynamics NAV 8 | --- 9 | 10 | {{% alert title="Warning" color="warning" %}} 11 | Please note that these patterns may not be up-to-date with the patterns for AL and Business Central Development. 12 | {{% /alert %}} 13 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/activity-log/Activity-Log-NAV.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/activity-log/Activity-Log-NAV.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/activity-log/Activity-Log.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/activity-log/Activity-Log.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/argument-table/0218.Argument-Table-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/argument-table/0218.Argument-Table-image.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/blocked-entity/2260.BlockedEntityPattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/blocked-entity/2260.BlockedEntityPattern.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/blocked-entity/3056.BlockedEntityPattern_5F00_5F00_5F00_Option.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/blocked-entity/3056.BlockedEntityPattern_5F00_5F00_5F00_Option.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/blocked-entity/8637.BlockedEntityPattern_5F00_5F00_5F00_Boolean.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/blocked-entity/8637.BlockedEntityPattern_5F00_5F00_5F00_Boolean.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/blocked-entity/data-driven-blocked-entity/attention.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/blocked-entity/data-driven-blocked-entity/attention.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/cached-web-service-calls/Cached_5F00_Web_5F00_Service_5F00_Calls_5F00_Diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/cached-web-service-calls/Cached_5F00_Web_5F00_Service_5F00_Calls_5F00_Diagram.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/conditional-cascading-update/3124.T18_5F00_Name_5F00_OnValidate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/conditional-cascading-update/3124.T18_5F00_Name_5F00_OnValidate.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/conditional-cascading-update/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Conditional Cascading Update" 3 | weight = 370 4 | tags = ["C/AL"] 5 | categories = ["Pattern"] 6 | +++ 7 | _Originally by Jan Hoek at IDYN_ 8 | 9 | ## Abstract 10 | 11 | The Conditional Cascading Update pattern is used to intelligently populate fields whose values depend on other field values. In this pattern description, the field triggering the update will be called "source field", and the depending field will be called "target field". 12 | 13 | ## Description 14 | 15 | The value of one table field sometimes depends on the value of another field, typically following an application-defined transformation (note that we're talking about transformations of field values here. This has nothing to do with e.g. form transformation), such as conversion to uppercase, removal of certain characters etc. 16 | 17 | If the target field is non-editable, said transformation is usually the only way for the target field to receive new values, so no irreproducible information can be lost. However, if the target field is editable, the user may have cared enough to override the default (transformed) value, in which case revalidating the source field should not blindly replace the target field's value. 18 | 19 | ## Usage 20 | 21 | In the OnValidate trigger of the source field, test if the target field value is either blank, or equal to the transformed value of the source field's previous contents. If it is, populate the target field's value with the transformed source field value. If it is not, do nothing (effectively preserving the value set by the user). 22 | 23 | ## NAV Specific Example 24 | 25 | In the base application, this pattern can be found in Search Name/Search Description fields, which are updated with the uppercase value from the corresponding Name/Description field when the latter is validated, only if the Search Name/Description in question is currently blank, or equal to the (uppercase equivalent) of the previous contents of the Name/Description field. 26 | 27 | [![ ][image0]][anchor0] 28 | 29 | In this particular case, the transformation between source and target fields is implicit and due to the different data types of the fields (text vs. code). Note how the field triggers of the Search Name field itself do not contain any logic linked to this pattern. 30 | 31 | ## Consequences 32 | 33 | There is a case when this pattern should not be used. If the target field is non-editable, this pattern will not add any value, since there won't be any user-overridden values to protect. 34 | 35 | 36 | 37 | [anchor0]: 3124.T18_5F00_Name_5F00_OnValidate.png 38 | 39 | 40 | [image0]: 3124.T18_5F00_Name_5F00_OnValidate.png 41 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/copy-document/clip_5F00_image006.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/copy-document/clip_5F00_image006.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/copy-document/clip_5F00_image008.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/copy-document/clip_5F00_image008.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/copy-document/clip_5F00_image010.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/copy-document/clip_5F00_image010.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/copy-document/clip_image002.gif-750x0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/copy-document/clip_image002.gif-750x0.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/copy-document/clip_image004.gif-750x0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/copy-document/clip_image004.gif-750x0.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/create-data-from-templates/2134.Picture6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/create-data-from-templates/2134.Picture6.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/create-data-from-templates/2816.Picture3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/create-data-from-templates/2816.Picture3.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/create-data-from-templates/3482.Picture-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/create-data-from-templates/3482.Picture-5.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/create-data-from-templates/4118.Picture1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/create-data-from-templates/4118.Picture1.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/create-data-from-templates/4341.Picture4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/create-data-from-templates/4341.Picture4.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/create-data-from-templates/7271.Picture4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/create-data-from-templates/7271.Picture4.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/create-urls-to-nav-clients/1778.url1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/create-urls-to-nav-clients/1778.url1.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/create-urls-to-nav-clients/7802.url2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/create-urls-to-nav-clients/7802.url2.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/creating-custom-charts/0246.Picture6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/creating-custom-charts/0246.Picture6.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/creating-custom-charts/1411.Picture2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/creating-custom-charts/1411.Picture2.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/creating-custom-charts/1541.Picture7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/creating-custom-charts/1541.Picture7.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/creating-custom-charts/1781.Picture5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/creating-custom-charts/1781.Picture5.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/creating-custom-charts/1803.Picture7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/creating-custom-charts/1803.Picture7.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/creating-custom-charts/2553.Picture8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/creating-custom-charts/2553.Picture8.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/creating-custom-charts/5153.Picture1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/creating-custom-charts/5153.Picture1.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/creating-custom-charts/5545.Picture9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/creating-custom-charts/5545.Picture9.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/creating-custom-charts/5582.Picture10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/creating-custom-charts/5582.Picture10.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/cross-session-events/PubSub.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/cross-session-events/PubSub.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/currently-active-record/6545.Table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/currently-active-record/6545.Table.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/data-migration-facade/8308.logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/data-migration-facade/8308.logo.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/data-migration-facade/NoStagingTableNew2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/data-migration-facade/NoStagingTableNew2.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/data-migration-facade/StagingTableNew2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/data-migration-facade/StagingTableNew2.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/data-migration-facade/errorhandling1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/data-migration-facade/errorhandling1.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/data-migration-facade/errorhandling2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/data-migration-facade/errorhandling2.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/discovery-event/Pic2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/discovery-event/Pic2.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/discovery-event/Pic2b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/discovery-event/Pic2b.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/discovery-event/Pic3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/discovery-event/Pic3.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/discovery-event/Pic4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/discovery-event/Pic4.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/discovery-event/ServiceConnections.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/discovery-event/ServiceConnections.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/document/0005.Document-Pattern-UML-Class-Diagram.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/document/0005.Document-Pattern-UML-Class-Diagram.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/document/2086.Design-Pattern-Document-SubPage-Properties.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/document/2086.Design-Pattern-Document-SubPage-Properties.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/easy-update-of-setup-or-supplementary-information/0654.easy-update-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/easy-update-of-setup-or-supplementary-information/0654.easy-update-1.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/easy-update-of-setup-or-supplementary-information/4024.easy-update-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/easy-update-of-setup-or-supplementary-information/4024.easy-update-2.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/error-message-processing/image001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/error-message-processing/image001.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/error-message-processing/image003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/error-message-processing/image003.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/extending-the-role-center-headlines/0724.Headline-sequence-diagram-v2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/extending-the-role-center-headlines/0724.Headline-sequence-diagram-v2.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/extending-the-role-center-headlines/3733.logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/extending-the-role-center-headlines/3733.logo.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/extending-the-role-center-headlines/Headline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/extending-the-role-center-headlines/Headline.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/feature-localization-for-data-structures/3058.Feature-localization-for-data-structures-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/feature-localization-for-data-structures/3058.Feature-localization-for-data-structures-3.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/feature-localization-for-data-structures/5123.Feature-localization-for-data-structures-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/feature-localization-for-data-structures/5123.Feature-localization-for-data-structures-1.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/feature-localization-for-data-structures/6052.Feature-localization-for-data-structures-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/feature-localization-for-data-structures/6052.Feature-localization-for-data-structures-2.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/hooks/5383.HookPattern1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/hooks/5383.HookPattern1.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/hooks/6378.HookPattern2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/hooks/6378.HookPattern2.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/hooks/8156.HookPattern3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/hooks/8156.HookPattern3.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/hooks/8875.HookPattern4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/hooks/8875.HookPattern4.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/implementation-of-surrogate-keys-using-autoincrement-pattern/0333.Figure-3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/implementation-of-surrogate-keys-using-autoincrement-pattern/0333.Figure-3.PNG -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/implementation-of-surrogate-keys-using-autoincrement-pattern/0458.Figure-1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/implementation-of-surrogate-keys-using-autoincrement-pattern/0458.Figure-1.PNG -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/implementation-of-surrogate-keys-using-autoincrement-pattern/0552.Example-Figure-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/implementation-of-surrogate-keys-using-autoincrement-pattern/0552.Example-Figure-5.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/implementation-of-surrogate-keys-using-autoincrement-pattern/0638.Figure-2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/implementation-of-surrogate-keys-using-autoincrement-pattern/0638.Figure-2.PNG -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/implementation-of-surrogate-keys-using-autoincrement-pattern/1488.Example-Figure-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/implementation-of-surrogate-keys-using-autoincrement-pattern/1488.Example-Figure-1.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/implementation-of-surrogate-keys-using-autoincrement-pattern/1884.Example-Figure-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/implementation-of-surrogate-keys-using-autoincrement-pattern/1884.Example-Figure-7.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/implementation-of-surrogate-keys-using-autoincrement-pattern/2068.Example-Figure-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/implementation-of-surrogate-keys-using-autoincrement-pattern/2068.Example-Figure-4.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/implementation-of-surrogate-keys-using-autoincrement-pattern/4477.Example-Figure-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/implementation-of-surrogate-keys-using-autoincrement-pattern/4477.Example-Figure-6.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/implementation-of-surrogate-keys-using-autoincrement-pattern/4532.Example-Figure-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/implementation-of-surrogate-keys-using-autoincrement-pattern/4532.Example-Figure-3.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/implementation-of-surrogate-keys-using-autoincrement-pattern/4682.Example-Figure-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/implementation-of-surrogate-keys-using-autoincrement-pattern/4682.Example-Figure-2.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/instructions-in-the-ui/2804.Picture-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/instructions-in-the-ui/2804.Picture-2.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/instructions-in-the-ui/5707.Picture-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/instructions-in-the-ui/5707.Picture-4.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/instructions-in-the-ui/6215.picture-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/instructions-in-the-ui/6215.picture-1.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/instructions-in-the-ui/6685.picture-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/instructions-in-the-ui/6685.picture-3.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/instructions-in-the-ui/7217.picture-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/instructions-in-the-ui/7217.picture-1.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/instructions-in-the-ui/7245.Picture-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/instructions-in-the-ui/7245.Picture-2.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/integration-of-addresses/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Integration of Addresses" 3 | weight = 680 4 | tags = ["C/AL"] 5 | categories = ["Pattern"] 6 | +++ 7 | {{< youtube 60Wrx9N-gfY>}} 8 | 9 | 10 | 11 | [anchor0]: https://www.youtube.com/watch?v=60Wrx9N-gfY&list=PLhZ3P-LY7CqmVszuvtJLujFyHpsVN0U_w&index=19 12 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/journal-error-processing/0005.Journal-Error-Processing-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/journal-error-processing/0005.Journal-Error-Processing-2.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/journal-error-processing/0777.Journal-Error-Processing.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/journal-error-processing/0777.Journal-Error-Processing.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/journal-error-processing/5518.Journal-Error-Processing-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/journal-error-processing/5518.Journal-Error-Processing-1.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/journal-error-processing/5661.Journal-Error-Processing-8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/journal-error-processing/5661.Journal-Error-Processing-8.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/journal-error-processing/8640.Journal-Error-Processing-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/journal-error-processing/8640.Journal-Error-Processing-3.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/journal-template-batch-line/2438.Journal-Template-Batch-Line-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/journal-template-batch-line/2438.Journal-Template-Batch-Line-1.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/journal-template-batch-line/8103.Journal-Template-Batch-Line-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/journal-template-batch-line/8103.Journal-Template-Batch-Line-2.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/master-data/PageCardDefinition.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/master-data/PageCardDefinition.PNG -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/master-data/PageCardPropertiesV2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/master-data/PageCardPropertiesV2.PNG -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/master-data/PageListDefinition.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/master-data/PageListDefinition.PNG -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/master-data/PageListPropertiesV2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/master-data/PageListPropertiesV2.PNG -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/master-data/Table.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/master-data/Table.PNG -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/master-data/TablePropertiesV2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/master-data/TablePropertiesV2.PNG -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/multi-page-list/Multi-page-list-img-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/multi-page-list/Multi-page-list-img-1.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/multi-page-list/Multi-page-list-img-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/multi-page-list/Multi-page-list-img-2.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/multilanguage-application-data/2746.3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/multilanguage-application-data/2746.3.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/multilanguage-application-data/4812.4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/multilanguage-application-data/4812.4.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/multilanguage-application-data/5670.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/multilanguage-application-data/5670.1.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/multilanguage-application-data/6746.2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/multilanguage-application-data/6746.2.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/net-exception-handling-in-cal/1856.DotNet_5F00_Exception_5F00_Handling_5F00_in_5F00_CAL_5F00_Diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/net-exception-handling-in-cal/1856.DotNet_5F00_Exception_5F00_Handling_5F00_in_5F00_CAL_5F00_Diagram.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/net-exception-handling-in-cal/tryfunction-net-exception-handling-in-cal/TryFunction_5F00_DotNet_5F00_Exception_5F00_Handling_5F00_in_5F00_CAL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/net-exception-handling-in-cal/tryfunction-net-exception-handling-in-cal/TryFunction_5F00_DotNet_5F00_Exception_5F00_Handling_5F00_in_5F00_CAL.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/no-series/1452.2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/no-series/1452.2.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/no-series/3527.3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/no-series/3527.3.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/no-series/5661.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/no-series/5661.1.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/notifications/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Notifications" 3 | weight = 890 4 | tags = ["C/AL"] 5 | categories = ["Pattern"] 6 | +++ 7 | A collection of patterns about notifications. 8 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/notifications/in-context-notifications/2514.Fig4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/notifications/in-context-notifications/2514.Fig4.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/notifications/in-context-notifications/2526.Fig11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/notifications/in-context-notifications/2526.Fig11.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/notifications/in-context-notifications/6646.Fig9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/notifications/in-context-notifications/6646.Fig9.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/notifications/in-context-notifications/6724.Fig2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/notifications/in-context-notifications/6724.Fig2.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/notifications/in-context-notifications/7701.Fig1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/notifications/in-context-notifications/7701.Fig1.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/notifications/notification-lifecycle-management-pattern/0677.3-notifications-smaller.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/notifications/notification-lifecycle-management-pattern/0677.3-notifications-smaller.PNG -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/notifications/notification-lifecycle-management-pattern/4807.1st-notification.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/notifications/notification-lifecycle-management-pattern/4807.1st-notification.PNG -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/notifications/notification-lifecycle-management-pattern/6138.logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/notifications/notification-lifecycle-management-pattern/6138.logo.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/notifications/notification-lifecycle-management-pattern/8512.2nd-notification.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/notifications/notification-lifecycle-management-pattern/8512.2nd-notification.PNG -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/notifications/notification-lifecycle-management-pattern/sequence1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/notifications/notification-lifecycle-management-pattern/sequence1.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/notifications/notification-lifecycle-management-pattern/sequence2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/notifications/notification-lifecycle-management-pattern/sequence2.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/notifications/notification-lifecycle-management-pattern/sequence3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/notifications/notification-lifecycle-management-pattern/sequence3.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/posting-routine-select-behavior/1563.PostingRoutineSelectBehaviour2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/posting-routine-select-behavior/1563.PostingRoutineSelectBehaviour2.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/posting-routine-select-behavior/5428.PostingRoutineSelectBehaviour3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/posting-routine-select-behavior/5428.PostingRoutineSelectBehaviour3.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/posting-routine-select-behavior/6170.PostingRoutineSelectBehaviour4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/posting-routine-select-behavior/6170.PostingRoutineSelectBehaviour4.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/posting-routine-select-behavior/7585.PostingRoutineSelectBehaviour1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/posting-routine-select-behavior/7585.PostingRoutineSelectBehaviour1.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/product-name/ProductName-Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/product-name/ProductName-Logo.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/product-name/ProductName-Sample.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/product-name/ProductName-Sample.PNG -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/product-name/ProductName-output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/product-name/ProductName-output.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/product-name/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Product Name" 3 | weight = 950 4 | tags = ["C/AL"] 5 | categories = ["Pattern"] 6 | +++ 7 | #### **Abstract** 8 | 9 | On many occasions, it's needed to refer to the product name in messages or errors. It's not a good practice to hardcode the brand name like Dynamics NAV 2017, and change this value with each rebranding. You can use client **ProductName** System Object instead to refer to the product name. 10 | 11 | [![ ][image0]][anchor0] 12 | 13 | #### **Problem** 14 | 15 | When you want to refer to product name in informational messages or errors, it's not a good practice to hardcode the brand name, as this requires changing this text when a rebranding happens. 16 | 17 | #### **Solution** 18 | 19 | Instead of hardcoding the product name like "Dynamics NAV 2017", it's recommended to use **ProductName** System Object that platform provides. 20 | 21 | You can use **ProductName** to refer to the product name, this you can use in text messages. **ProductName** has 3 values **ProductName.Short**, **ProductName.Full**, and **ProductName.Marketing**, each one should be used according to the context of your message. 22 | 23 | It's recommended to use **ProductName.Short** for most in-product texts , **ProductName.Full** when other dynamics apps are present in the message context (like CRM), and **ProductName.Marketing** only when absolutely necessary. 24 | 25 | **Usage**: You should make a placeholder in your text constant and substitute this placeholder with **ProductName** as shown below. 26 | 27 | [![ ][image1]][anchor1] 28 | 29 | **Output** 30 | 31 | [![ ][image2]][anchor2] 32 | 33 | #### **Benefits** 34 | 35 | * This decouples your messages from the application name 36 | * This removes the effort of maintaining these messages and keeping them up to date with the brand name. 37 | 38 | #### **Limitations** 39 | 40 | * **ProductName** can't be used for tooltips and captions, it can only be used for text constants (Labels). 41 | * **ProductName** System object doesn't exist in NAV 2016 and earlier version. 42 | 43 | 44 | 45 | [anchor0]: ProductName-Logo.png 46 | [anchor1]: ProductName-Sample.PNG 47 | [anchor2]: ProductName-output.png 48 | 49 | 50 | [image0]: ProductName-Logo.png 51 | [image1]: ProductName-Sample.PNG 52 | [image2]: ProductName-output.png 53 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/queries/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Queries" 3 | weight = 960 4 | tags = ["C/AL"] 5 | categories = ["Pattern"] 6 | +++ 7 | Expand to see NAV design patterns which use queries. 8 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/queries/select-distinct-with-queries/6521.clip_5F00_image001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/queries/select-distinct-with-queries/6521.clip_5F00_image001.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/queries/select-distinct-with-queries/Untitled-picture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/queries/select-distinct-with-queries/Untitled-picture.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/queries/select-distinct-with-queries/clip_5F00_image002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/queries/select-distinct-with-queries/clip_5F00_image002.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/queries/select-distinct-with-queries/clip_5F00_image003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/queries/select-distinct-with-queries/clip_5F00_image003.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/queries/select-distinct-with-queries/clip_5F00_image004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/queries/select-distinct-with-queries/clip_5F00_image004.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/queries/select-distinct-with-queries/clip_5F00_image005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/queries/select-distinct-with-queries/clip_5F00_image005.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/queries/select-distinct-with-queries/clip_5F00_image006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/queries/select-distinct-with-queries/clip_5F00_image006.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/queries/select-distinct-with-queries/clip_5F00_image007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/queries/select-distinct-with-queries/clip_5F00_image007.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/queries/select-distinct-with-queries/clip_5F00_image008.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/queries/select-distinct-with-queries/clip_5F00_image008.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/queries/use-queries-to-detect-duplicate-records/clip_5F00_image002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/queries/use-queries-to-detect-duplicate-records/clip_5F00_image002.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/queries/use-queries-to-replace-nested-loops/5040.clip_5F00_image002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/queries/use-queries-to-replace-nested-loops/5040.clip_5F00_image002.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/read-once-initialization-and-validation/2465.5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/read-once-initialization-and-validation/2465.5.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/read-once-initialization-and-validation/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/read-once-initialization-and-validation/4.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/read-once-initialization-and-validation/4314.3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/read-once-initialization-and-validation/4314.3.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/read-once-initialization-and-validation/4477.2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/read-once-initialization-and-validation/4477.2.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/read-once-initialization-and-validation/5025.2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/read-once-initialization-and-validation/5025.2.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/read-once-initialization-and-validation/5672.8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/read-once-initialization-and-validation/5672.8.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/read-once-initialization-and-validation/5857.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/read-once-initialization-and-validation/5857.1.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/read-once-initialization-and-validation/6332.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/read-once-initialization-and-validation/6332.1.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/security/1-sensitive-data-encapsulation/Data-Encapsulation-_2D00_-figure-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/security/1-sensitive-data-encapsulation/Data-Encapsulation-_2D00_-figure-1.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/security/1-sensitive-data-encapsulation/Logo-_2D00_-Protected-Data-Encapsulation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/security/1-sensitive-data-encapsulation/Logo-_2D00_-Protected-Data-Encapsulation.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/security/1-sensitive-data-encapsulation/Multi-_2D00_-1-2.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/security/1-sensitive-data-encapsulation/Multi-_2D00_-1-2.JPG -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/security/2-data-encryption/Encryption-_2D00_-1.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/security/2-data-encryption/Encryption-_2D00_-1.JPG -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/security/2-data-encryption/Encryption-_2D00_-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/security/2-data-encryption/Encryption-_2D00_-2.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/security/2-data-encryption/Encryption-_2D00_-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/security/2-data-encryption/Encryption-_2D00_-3.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/security/2-data-encryption/Encryption-_2D00_-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/security/2-data-encryption/Encryption-_2D00_-4.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/security/2-data-encryption/Encryption-_2D00_-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/security/2-data-encryption/Encryption-_2D00_-5.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/security/2-data-encryption/Logo-_2D00_-Encryption.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/security/2-data-encryption/Logo-_2D00_-Encryption.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/security/2-data-encryption/Multi-_2D00_-1-2-3.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/security/2-data-encryption/Multi-_2D00_-1-2-3.JPG -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/security/3-single-point-of-access/Logo-_2D00_-Single-Point-of-Access.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/security/3-single-point-of-access/Logo-_2D00_-Single-Point-of-Access.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/security/3-single-point-of-access/Multi-_2D00_-1-2-3-4.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/security/3-single-point-of-access/Multi-_2D00_-1-2-3-4.JPG -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/security/4-masked-text/Logo-_2D00_-Masked-Text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/security/4-masked-text/Logo-_2D00_-Masked-Text.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/security/4-masked-text/Masking-_2D00_-CRM-Connection-Setup-page.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/security/4-masked-text/Masking-_2D00_-CRM-Connection-Setup-page.PNG -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/security/5-ssl-in-nav/Logo-_2D00_-SSL.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/security/5-ssl-in-nav/Logo-_2D00_-SSL.JPG -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/security/5-ssl-in-nav/SSL-_2D00_-before-and-after.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/security/5-ssl-in-nav/SSL-_2D00_-before-and-after.PNG -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/security/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Security" 3 | weight = 1030 4 | tags = ["C/AL"] 5 | categories = ["Pattern"] 6 | +++ 7 | _By Bogdana Botez at Microsoft Development Center Copenhagen_ 8 | 9 | ## **Security patterns for NAV** 10 | 11 | ### **Problem statement** 12 | 13 | When sensitive data is stored inside the Dynamics NAV database, if negligently handled, it can become vulnerable. Particularly, the location, access and the state of the data are critical. 14 | 15 | Use the following patterns to enhance security on your NAV system. 16 | 17 | 1. [Sensitive Data Encapsulation][anchor0] 18 | 2. [Data Encryption][anchor1] 19 | 3. [Single Point of Access][anchor2] 20 | 4. [Masked Text][anchor3] 21 | 5. [SSL in NAV][anchor4] 22 | 23 | 24 | 25 | [anchor0]: /navpatterns/1-patterns/security/1-sensitive-data-encapsulation/ 26 | [anchor1]: /navpatterns/1-patterns/security/2-data-encryption/ 27 | [anchor2]: /navpatterns/1-patterns/security/3-single-point-of-access/ 28 | [anchor3]: /navpatterns/1-patterns/security/4-masked-text/ 29 | [anchor4]: /navpatterns/1-patterns/security/5-ssl-in-nav/ 30 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/setup-specificity-fallback/0724.Printer-Selection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/setup-specificity-fallback/0724.Printer-Selection.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/setup-specificity-fallback/2335.FindPrinter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/setup-specificity-fallback/2335.FindPrinter.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/silent-file-upload-and-download/6428.Silent-File-download-design-pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/silent-file-upload-and-download/6428.Silent-File-download-design-pattern.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/silent-file-upload-and-download/8688.Silent-file-upload-and-download-NAV-design-pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/silent-file-upload-and-download/8688.Silent-file-upload-and-download-NAV-design-pattern.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/singleton/0535.Singleton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/singleton/0535.Singleton.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/singleton/singleton-codeunit/2313.Singleton-Codeunit-_2D00_-CSIDE-SingleInstance-property.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/singleton/singleton-codeunit/2313.Singleton-Codeunit-_2D00_-CSIDE-SingleInstance-property.PNG -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/singleton/singleton-codeunit/Singleton-Codeunit-_2D00_-example-_2D00_-bad.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/singleton/singleton-codeunit/Singleton-Codeunit-_2D00_-example-_2D00_-bad.PNG -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/singleton/singleton-codeunit/Singleton-Codeunit-_2D00_-example-_2D00_-good.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/singleton/singleton-codeunit/Singleton-Codeunit-_2D00_-example-_2D00_-good.PNG -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/singleton/singleton-codeunit/Singleton-Codeunit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/singleton/singleton-codeunit/Singleton-Codeunit.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/singleton/singleton-table/5554.Singleton-Table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/singleton/singleton-table/5554.Singleton-Table.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/singleton/singleton-table/cue-table/Cue-Table-Figure-1.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/singleton/singleton-table/cue-table/Cue-Table-Figure-1.JPG -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/singleton/singleton-table/cue-table/Cue-Table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/singleton/singleton-table/cue-table/Cue-Table.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/singleton/singleton-table/setup-table/6675.NAVSetupTablePattern2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/singleton/singleton-table/setup-table/6675.NAVSetupTablePattern2.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/singleton/singleton-table/setup-table/Setup-Table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/singleton/singleton-table/setup-table/Setup-Table.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/standard-journal/0143.Standard-Document-Pattern-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/standard-journal/0143.Standard-Document-Pattern-2.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/standard-journal/0456.Standard-Journal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/standard-journal/0456.Standard-Journal.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/standard-journal/0820.Standard-Document-Pattern-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/standard-journal/0820.Standard-Document-Pattern-1.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/standard-journal/5327.Standard-Document-Pattern-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/standard-journal/5327.Standard-Document-Pattern-3.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/temporary-dataset-report/0250.Temporary-Dataset-Report-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/temporary-dataset-report/0250.Temporary-Dataset-Report-1.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/temporary-dataset-report/2376.Temporary-Dataset-Report-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/temporary-dataset-report/2376.Temporary-Dataset-Report-2.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/temporary-dataset-report/4010.Temporary-Dataset-Report-6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/temporary-dataset-report/4010.Temporary-Dataset-Report-6.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/temporary-dataset-report/4118.Temporary-Dataset-Report-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/temporary-dataset-report/4118.Temporary-Dataset-Report-5.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/temporary-dataset-report/6523.Temporary-Dataset-Report-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/temporary-dataset-report/6523.Temporary-Dataset-Report-4.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/temporary-dataset-report/7607.Temporary-Dataset-Report-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/temporary-dataset-report/7607.Temporary-Dataset-Report-3.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/totals-and-discounts-on-subpages-sales-and-purchases/4300.Fig-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/totals-and-discounts-on-subpages-sales-and-purchases/4300.Fig-1.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/totals-and-discounts-on-subpages-sales-and-purchases/6305.Fig-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/totals-and-discounts-on-subpages-sales-and-purchases/6305.Fig-4.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/totals-and-discounts-on-subpages-sales-and-purchases/Fig-10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/totals-and-discounts-on-subpages-sales-and-purchases/Fig-10.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/totals-and-discounts-on-subpages-sales-and-purchases/Fig-11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/totals-and-discounts-on-subpages-sales-and-purchases/Fig-11.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/totals-and-discounts-on-subpages-sales-and-purchases/Fig-12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/totals-and-discounts-on-subpages-sales-and-purchases/Fig-12.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/totals-and-discounts-on-subpages-sales-and-purchases/Fig-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/totals-and-discounts-on-subpages-sales-and-purchases/Fig-2.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/totals-and-discounts-on-subpages-sales-and-purchases/Fig-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/totals-and-discounts-on-subpages-sales-and-purchases/Fig-3.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/totals-and-discounts-on-subpages-sales-and-purchases/Fig-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/totals-and-discounts-on-subpages-sales-and-purchases/Fig-5.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/totals-and-discounts-on-subpages-sales-and-purchases/Fig-6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/totals-and-discounts-on-subpages-sales-and-purchases/Fig-6.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/totals-and-discounts-on-subpages-sales-and-purchases/Fig-7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/totals-and-discounts-on-subpages-sales-and-purchases/Fig-7.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/totals-and-discounts-on-subpages-sales-and-purchases/Fig-8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/totals-and-discounts-on-subpages-sales-and-purchases/Fig-8.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/totals-and-discounts-on-subpages-sales-and-purchases/Fig-9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/totals-and-discounts-on-subpages-sales-and-purchases/Fig-9.jpg -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/transfer-custom-fields/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Transfer Custom Fields" 3 | weight = 1230 4 | tags = ["C/AL"] 5 | categories = ["Pattern"] 6 | +++ 7 | {{< youtube cGaBqwfGCws>}} 8 | 9 | 10 | 11 | [anchor0]: https://www.youtube.com/watch?v=cGaBqwfGCws&list=PLhZ3P-LY7CqmVszuvtJLujFyHpsVN0U_w&index=9 12 | -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/variant-facade/Picture2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/variant-facade/Picture2.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/variant-facade/Picture3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/variant-facade/Picture3.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/variant-facade/Picture4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/variant-facade/Picture4.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/variant-facade/Picture5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/variant-facade/Picture5.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/variant-facade/Picture6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/variant-facade/Picture6.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/variant-facade/Picture7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/variant-facade/Picture7.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/variant-facade/Picture8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/variant-facade/Picture8.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/patterns/variant-facade/picture1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/NAVPatterns/patterns/variant-facade/picture1.png -------------------------------------------------------------------------------- /content/docs/NAVPatterns/related-links/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Related Links" 3 | weight = 990 4 | tags = ["C/AL"] 5 | +++ 6 | Find below some related NAV Design Patterns links. 7 | 8 | [MSDN NAV Team Blog - posts about patterns][anchor0] 9 | 10 | [NAV Application Design slides ][anchor1]from NAV TechDays conference in Antwerp, 2013 11 | 12 | [NAV Application Design movie][anchor2] from NAV TechDays conference in Antwerp, 2013 13 | 14 | [NAV's Secret Code: Design Patterns of Today and Tomorrow][anchor3] slides from NAV TechDays conference in Antwerp, 2013 15 | 16 | 17 | 18 | [anchor0]: http://blogs.msdn.com/b/nav/archive/tags/patterns/ "MSDN NAV Team Blog - posts about patterns" 19 | [anchor1]: http://mibuso.com/dlinfo.asp?FileID=1573 "NAV Application Design slides " 20 | [anchor2]: http://mibuso.com/dlinfo.asp?FileID=1556 "NAV Application Design movie" 21 | [anchor3]: http://mibuso.com/dlinfo.asp?FileID=1568 22 | -------------------------------------------------------------------------------- /content/docs/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "AL Guidelines" 3 | linkTitle: Docs 4 | weight: 20 5 | description: > 6 | Patterns and Best Practices for AL Development 7 | --- 8 | 9 | ## Business Central Design Patterns & Best Practices 10 | 11 | This site is meant to house some of the community's knowledge about Microsoft Dynamics 365 Business Central AL Development best practices, particularly around hosting Design Patterns. 12 | 13 | ### What are Design Patterns? 14 | 15 | To quote the original NAV Team blog post about the NAV Design Patterns: 16 | 17 | > A team of people interested in NAV application design has come together to work on naming and surfacing design solutions to common NAV business needs. When those solutions are generic enough to be applied in various places of the NAV application, with slight variations on implementation but mainly respecting the same base concepts, we can describe them as NAV design patterns. 18 | 19 | A design pattern is a repeatable template of how to solve a common development challenge. 20 | 21 | ### What are Development Best Practices? 22 | 23 | (more text coming soon) 24 | 25 | ### History of "NAV Design Patterns" 26 | 27 | In 2013, Microsoft NAV Dev Team and prominent members of the community collaborated on a Community and Microsoft collection of commonly needed / used Design Patterns. 28 | 29 | For some history on this, waldo's posts [Code is Poetry](https://www.waldo.be/2013/06/14/code-is-poetry/) and [Design is Philosophy](https://www.waldo.be/2013/08/28/design-is-philosophy-2/) are a great read. 30 | 31 | 32 | #### Behind This Project 33 | 34 | This project is a Microsoft Business Central Community initiative with support from the Microsoft Business Central team. The founding community members are 35 | * waldo ([Twitter](https://twitter.com/waldo1001), [Blog](https://www.waldo.be), [GitHub](https://github.com/waldo1001)) 36 | * Arend-Jan Kauffmann ([Twitter](https://twitter.com/ajkauffmann), [Blog](https://www.kauffmann.nl/), [GitHub](https://github.com/ajkauffmann)) 37 | * Henrik Helgesen ([Twitter](https://twitter.com/TheDoubleH), [Blog](https://thedoubleh.dev/), [GitHub](https://github.com/thedoubleh)) 38 | * Jeremy Vyska ([Twitter](https://twitter.com/JeremyVyska),[Blog](https://jeremy.vyska.info/articles), [GitHub](https://github.com/JeremyVyska)) 39 | 40 | #### Contributing 41 | 42 | To find out more about contributing, read up here: 43 | [Contributing](/docs/contributing/) 44 | -------------------------------------------------------------------------------- /content/docs/patterns/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Design Patterns" 3 | weight: 2 4 | description: > 5 | AL Code Design Patterns 6 | --- 7 | 8 | # Business Central Design Patterns 9 | 10 | This section will cover patterns that solve certain design challenges in Business Central. 11 | 12 | From wikipedia: 13 | 14 | _In Computer science, a Design pattern is an abstract solution to a certain problem. Design patterns are used in object oriented programming. They give a possible solution to a problem of designing software ... They also simplify the language between computer scientists. Ideally, a design pattern should be reusable many times. It is like a brick of a house, it can be used for many different problems. One can also build bridges with bricks, not only houses._ 15 | 16 | ## Discussion 17 | 18 | All discussion related to Best Practice are to be found on the Github Repo's Discussion pages, found [here](https://github.com/microsoft/alguidelines/discussions/categories/bc-patterns) 19 | -------------------------------------------------------------------------------- /content/docs/patterns/command-queue/queue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/patterns/command-queue/queue.png -------------------------------------------------------------------------------- /content/docs/patterns/error-handling/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Error Handling" 3 | tags = ["AL"] 4 | categories = ["Pattern"] 5 | +++ 6 | 7 | _Created by Microsoft, Described by Luuk Busschers (Dysel)_ 8 | 9 | ## Abstract 10 | 11 | The "Error Handling" system is used extensively to provide information to users about missing information in the system or other issues because of which the started process cannot be completed through Microsoft Dynamics 365 Business Central. 12 | 13 | ## Description 14 | Because of there is already a lot written about how to use the error handling the best in several scenario's in this page you will find a link to documentation on learn.microsoft.com and a link to a video about this subject on youtube. These links can be found in the list of references. 15 | 16 | The Microsoft Learn part is about collecting errors which means that the process you did start will not be interupted when one error is given, it will collect the errors in the process an you are able to show the user afterwards which errors where given in the process. 17 | 18 | The youtube video shows more about errors presented in such way that the user will be informed about how to solve the error. 19 | 20 | ## List of references 21 | 22 | For error handling, there is more information available on: 23 | - [Microsoft Learn: Error collections](https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-error-collection/) 24 | - [Youtube: Microsoft Presents: User friendly error handling in AL](https://www.youtube.com/watch?v=D8233xMjVog&list=PLI1l3dMI8xlDM9onioMWUyMSCiFs_mMWw&index=27) -------------------------------------------------------------------------------- /content/docs/patterns/facade-pattern/diagram.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/content/docs/patterns/facade-pattern/diagram.jpg -------------------------------------------------------------------------------- /content/search.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Search Results 3 | layout: search 4 | --- 5 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/microsoft/alguidelines 2 | 3 | go 1.23.0 4 | 5 | require github.com/google/docsy v0.10.0 // indirect 6 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | github.com/FortAwesome/Font-Awesome v0.0.0-20240402185447-c0f460dca7f7/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= 2 | github.com/google/docsy v0.10.0 h1:6tMDacPwAyRWNCfvsn/9qGOZDQ8b0aRzjRZvnZPY5dg= 3 | github.com/google/docsy v0.10.0/go.mod h1:c0nIAqmRTOuJ01F85U/wJPQtc3Zj9N58Kea9bOT2AJc= 4 | github.com/twbs/bootstrap v5.3.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= 5 | -------------------------------------------------------------------------------- /layouts/partials/logo.html: -------------------------------------------------------------------------------- 1 | 13 | 14 | Code is Poetry ... -------------------------------------------------------------------------------- /layouts/partials/navbar.html: -------------------------------------------------------------------------------- 1 | {{ $cover := and (.HasShortcode "blocks/cover") (not .Site.Params.ui.navbar_translucent_over_cover_disable) }} 2 | 38 | -------------------------------------------------------------------------------- /layouts/partials/page-meta-lastmod.html: -------------------------------------------------------------------------------- 1 | {{ if and (.GitInfo) (.Site.Params.github_repo) -}} 2 |
3 | {{ T "post_last_mod" }} {{ .Lastmod.Format .Site.Params.time_format_default -}} 4 | {{ with .GitInfo }}: {{/* Trim WS */ -}} 5 | 6 | {{- .Subject }} ({{ .AbbreviatedHash }}) {{- /* Trim WS */ -}} 7 | 8 | by {{ .AuthorName }} 9 | {{- end }} 10 |
11 | {{ end -}} -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tech-doc-hugo", 3 | "version": "0.0.1", 4 | "description": "Hugo theme for technical documentation.", 5 | "main": "none.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/google/docsy-example.git" 12 | }, 13 | "author": "", 14 | "license": "ISC", 15 | "bugs": { 16 | "url": "https://github.com/google/docsy-example/issues" 17 | }, 18 | "homepage": "https://github.com/google/docsy-example#readme", 19 | "devDependencies": { 20 | "autoprefixer": "^10.4.2", 21 | "postcss": "^8.4.31", 22 | "postcss-cli": "^9.1.0" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /static/CNAME: -------------------------------------------------------------------------------- 1 | alguidelines.dev 2 | -------------------------------------------------------------------------------- /static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/static/favicon.ico -------------------------------------------------------------------------------- /static/favicons/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/static/favicons/android-chrome-192x192.png -------------------------------------------------------------------------------- /static/favicons/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/static/favicons/android-chrome-512x512.png -------------------------------------------------------------------------------- /static/favicons/android-chrome-maskable-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/static/favicons/android-chrome-maskable-192x192.png -------------------------------------------------------------------------------- /static/favicons/android-chrome-maskable-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/static/favicons/android-chrome-maskable-512x512.png -------------------------------------------------------------------------------- /static/favicons/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/static/favicons/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /static/favicons/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/static/favicons/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /static/favicons/apple-touch-icon-167x167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/static/favicons/apple-touch-icon-167x167.png -------------------------------------------------------------------------------- /static/favicons/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/static/favicons/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /static/favicons/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/static/favicons/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /static/favicons/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/static/favicons/apple-touch-icon.png -------------------------------------------------------------------------------- /static/favicons/coast-228x228.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/static/favicons/coast-228x228.png -------------------------------------------------------------------------------- /static/favicons/favicon-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/static/favicons/favicon-128x128.png -------------------------------------------------------------------------------- /static/favicons/favicon-256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/static/favicons/favicon-256x256.png -------------------------------------------------------------------------------- /static/favicons/favicon-48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/static/favicons/favicon-48x48.png -------------------------------------------------------------------------------- /static/favicons/favicon-64x64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/static/favicons/favicon-64x64.png -------------------------------------------------------------------------------- /static/favicons/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/static/favicons/favicon-96x96.png -------------------------------------------------------------------------------- /static/favicons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/static/favicons/favicon.ico -------------------------------------------------------------------------------- /static/favicons/msapplication-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/static/favicons/msapplication-icon-144x144.png -------------------------------------------------------------------------------- /static/favicons/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/static/favicons/mstile-150x150.png -------------------------------------------------------------------------------- /static/images/Hero_Side_Device_BC_Capability.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/static/images/Hero_Side_Device_BC_Capability.png -------------------------------------------------------------------------------- /static/images/SiteLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/static/images/SiteLogo.png -------------------------------------------------------------------------------- /static/images/body-img-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/static/images/body-img-1.png -------------------------------------------------------------------------------- /static/images/brainstorming-team-meeting_38894532.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/static/images/brainstorming-team-meeting_38894532.png -------------------------------------------------------------------------------- /static/images/hero-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/static/images/hero-bg.png -------------------------------------------------------------------------------- /static/images/hero-bg.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/static/images/hero-bg.webp -------------------------------------------------------------------------------- /static/images/wave.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/static/images/wave.webp -------------------------------------------------------------------------------- /static/images/whats-new-bg.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/alguidelines/5e76983b77f5ae333f4b23b8d388c1cb0a380f81/static/images/whats-new-bg.webp --------------------------------------------------------------------------------