From bb587c5d0990567395e845db062fa7ea27b436b1 Mon Sep 17 00:00:00 2001 From: christianbraeunlich Date: Thu, 17 Mar 2022 21:44:33 +0100 Subject: [PATCH 1/5] change wit to with --- content/docs/BestPractices/api-page/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/BestPractices/api-page/index.md b/content/docs/BestPractices/api-page/index.md index b2d38d46..b541fe10 100644 --- a/content/docs/BestPractices/api-page/index.md +++ b/content/docs/BestPractices/api-page/index.md @@ -166,7 +166,7 @@ It is common use to give certain fields a more describing name. Some examples ar These fields should always be part of the API Page: * SystemId - * This field should be exposed wit the name ```id``` + * This field should be exposed with the name ```id``` * SystemModifiedAt * This field should be exposed with the name ```lastModifiedDateTime```. If you choose a different name, then the webhook functionality will not work properly. From 42358aab34506f91a1a582624fd713ff550f81a5 Mon Sep 17 00:00:00 2001 From: christianbraeunlich Date: Thu, 17 Mar 2022 21:44:50 +0100 Subject: [PATCH 2/5] added period at the end --- content/docs/BestPractices/CustomTelemetry/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/BestPractices/CustomTelemetry/index.md b/content/docs/BestPractices/CustomTelemetry/index.md index 9f8b7ba0..02fc2d19 100644 --- a/content/docs/BestPractices/CustomTelemetry/index.md +++ b/content/docs/BestPractices/CustomTelemetry/index.md @@ -71,7 +71,7 @@ Of course it is possible to have a single object as a central place to emit tele ## Candidate data for telemetry -Telemetry must be **actionable** for the customer. Do not emit signals that they cannot act on (knowing about CPU performance counters on the database is useless if the partner cannot scale the database) +Telemetry must be **actionable** for the customer. Do not emit signals that they cannot act on period (knowing about CPU performance counters on the database is useless if the partner cannot scale the database). Also, note that customers pay for data ingestion. So be mindful to not flood their telemetry resources. Consider to use TelemetryScope::ExtensionPublisher by default and only use TelemetryScope::All in case the customer can also act on the data. From 83053e728713b69f585a9f30507cab8b747eb55a Mon Sep 17 00:00:00 2001 From: christianbraeunlich Date: Sat, 19 Mar 2022 22:11:52 +0100 Subject: [PATCH 3/5] added indentation --- .../docs/BestPractices/begin-as-an-afterword/index.md | 5 ++--- content/docs/BestPractices/begin-end/index.md | 5 ++--- .../BestPractices/binary-operator-line-start/index.md | 10 +++++----- content/docs/BestPractices/end-else-pair/index.md | 8 ++++---- .../docs/BestPractices/separate-if-and-else/index.md | 8 ++++---- .../BestPractices/spacing-binary-operators/index.md | 10 +++++----- 6 files changed, 22 insertions(+), 24 deletions(-) diff --git a/content/docs/BestPractices/begin-as-an-afterword/index.md b/content/docs/BestPractices/begin-as-an-afterword/index.md index 5ad547bd..5b6bac47 100644 --- a/content/docs/BestPractices/begin-as-an-afterword/index.md +++ b/content/docs/BestPractices/begin-as-an-afterword/index.md @@ -15,7 +15,7 @@ When `begin` follows `then`, `else`, `do`, it should be on the same line, preced ```al if ICPartnerRefType = ICPartnerRefType::"Common Item No." then begin - ... + ... end; ``` @@ -23,7 +23,6 @@ When `begin` follows `then`, `else`, `do`, it should be on the same line, preced ```al if ICPartnerRefType = ICPartnerRefType::"Common Item No." then begin - ... + ... end; ``` - diff --git a/content/docs/BestPractices/begin-end/index.md b/content/docs/BestPractices/begin-end/index.md index 9547b703..f92bf395 100644 --- a/content/docs/BestPractices/begin-end/index.md +++ b/content/docs/BestPractices/begin-end/index.md @@ -13,7 +13,7 @@ Only use begin..end to enclose [compound statements](https://docs.microsoft.com/ ```AL if FindSet() then begin repeat - ... + ... until next() = 0; end; ``` @@ -23,7 +23,7 @@ end; ```AL if FindSet() then repeat - ... + ... until next() = 0; ``` @@ -52,4 +52,3 @@ if X then begin end else (not X) ``` - diff --git a/content/docs/BestPractices/binary-operator-line-start/index.md b/content/docs/BestPractices/binary-operator-line-start/index.md index d545a46c..2f7ecae8 100644 --- a/content/docs/BestPractices/binary-operator-line-start/index.md +++ b/content/docs/BestPractices/binary-operator-line-start/index.md @@ -8,20 +8,20 @@ _Created by Microsoft, Described by waldo_ ## Description -Do not start a line with a binary operator. +Do not start a line with a binary operator. ## Bad code ```AL "Quantity to Ship" := -Quantity -- "Quantity Shipped" + Quantity + - "Quantity Shipped" ``` ## Good code ```AL "Quantity to Ship" := -Quantity - -"Quantity Shipped" + Quantity - + "Quantity Shipped" ``` diff --git a/content/docs/BestPractices/end-else-pair/index.md b/content/docs/BestPractices/end-else-pair/index.md index 98aa85c2..29313176 100644 --- a/content/docs/BestPractices/end-else-pair/index.md +++ b/content/docs/BestPractices/end-else-pair/index.md @@ -15,11 +15,11 @@ The `end else` pair should always appear on the same line. ```al if OppEntry.Find('-') then if SalesCycleStage.Find('-') then begin - ... + ... end else begin - ... + ... end; ``` @@ -28,8 +28,8 @@ The `end else` pair should always appear on the same line. ```al if OppEntry.Find('-') then if SalesCycleStage.Find('-') then begin - ... + ... end else begin - ... + ... end; ``` diff --git a/content/docs/BestPractices/separate-if-and-else/index.md b/content/docs/BestPractices/separate-if-and-else/index.md index 8e7aec4e..805ff90c 100644 --- a/content/docs/BestPractices/separate-if-and-else/index.md +++ b/content/docs/BestPractices/separate-if-and-else/index.md @@ -8,20 +8,20 @@ _Created by Microsoft, Described by waldo_ ## Description -`if` and `else` statements should be on separate lines. +`if` and `else` statements should be on separate lines. ## Bad code ```al - if Atom = '\>' then HasLogicalOperator := true else begin - ... + if Atom = '>' then HasLogicalOperator := true else begin + ... end; ``` ## Good code ```al - if Atom = '\>' then + if Atom = '>' then HasLogicalOperator := true else begin ... diff --git a/content/docs/BestPractices/spacing-binary-operators/index.md b/content/docs/BestPractices/spacing-binary-operators/index.md index 95b79808..32902eae 100644 --- a/content/docs/BestPractices/spacing-binary-operators/index.md +++ b/content/docs/BestPractices/spacing-binary-operators/index.md @@ -13,31 +13,31 @@ There must be exactly one space character on each side of a binary operator such ## Bad code ```al - "Line Discount %" := "Line Discount Amount"/"Line Value"*100; + "Line Discount %" := "Line Discount Amount"/"Line Value"*100; ``` ## Good code ```al - "Line Discount %" := "Line Discount Amount" / "Line Value" * 100; + "Line Discount %" := "Line Discount Amount" / "Line Value" * 100; ``` ## Bad code ```al - StartDate := CalcDate('<+'+Format(Days+i)+'D\>',StartDate); + StartDate := CalcDate('<+'+Format(Days+i)+'D\>',StartDate); ``` ## Good code ```al - StartDate := CalcDate('<+' + Format(Days + i) + 'D\>', StartDate); + StartDate := CalcDate('<+' + Format(Days + i) + 'D\>', StartDate); ``` ## Bad code ```al - StartDate:=0D; // Initialize + StartDate:=0D; // Initialize ``` ## Good code From 417cc2f0253340e011fda08b22538f0e4fb106d1 Mon Sep 17 00:00:00 2001 From: Henrik Helgesen Date: Thu, 24 Mar 2022 14:50:26 -0700 Subject: [PATCH 4/5] Update content/docs/BestPractices/CustomTelemetry/index.md Removed the word period --- content/docs/BestPractices/CustomTelemetry/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/BestPractices/CustomTelemetry/index.md b/content/docs/BestPractices/CustomTelemetry/index.md index 02fc2d19..c2f1eb20 100644 --- a/content/docs/BestPractices/CustomTelemetry/index.md +++ b/content/docs/BestPractices/CustomTelemetry/index.md @@ -71,7 +71,7 @@ Of course it is possible to have a single object as a central place to emit tele ## Candidate data for telemetry -Telemetry must be **actionable** for the customer. Do not emit signals that they cannot act on period (knowing about CPU performance counters on the database is useless if the partner cannot scale the database). +Telemetry must be **actionable** for the customer. Do not emit signals that they cannot act on (knowing about CPU performance counters on the database is useless if the partner cannot scale the database). Also, note that customers pay for data ingestion. So be mindful to not flood their telemetry resources. Consider to use TelemetryScope::ExtensionPublisher by default and only use TelemetryScope::All in case the customer can also act on the data. From 6b80f47379e7a0e1cc1d05cc6da5ed08fe186898 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Maro=C5=84?= Date: Wed, 30 Mar 2022 09:45:26 +0200 Subject: [PATCH 5/5] Added Rec. to the API Page code Example --- content/docs/BestPractices/api-page/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/docs/BestPractices/api-page/index.md b/content/docs/BestPractices/api-page/index.md index b541fe10..b1dc4488 100644 --- a/content/docs/BestPractices/api-page/index.md +++ b/content/docs/BestPractices/api-page/index.md @@ -179,8 +179,8 @@ layout { repeater(records) { - field(id; SystemId) { } - field(lastModifiedDateTime; SystemModifiedAt) { } + field(id; Rec.SystemId) { } + field(lastModifiedDateTime; Rec.SystemModifiedAt) { } } } }