Merge branch 'microsoft:main' into main
This commit is contained in:
commit
e49c2af933
8 changed files with 26 additions and 28 deletions
|
|
@ -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
|
## 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 (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.
|
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.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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:
|
These fields should always be part of the API Page:
|
||||||
|
|
||||||
* SystemId
|
* SystemId
|
||||||
* This field should be exposed wit the name ```id```
|
* This field should be exposed with the name ```id```
|
||||||
* SystemModifiedAt
|
* SystemModifiedAt
|
||||||
* This field should be exposed with the name ```lastModifiedDateTime```. If you choose a different name, then the webhook functionality will not work properly.
|
* This field should be exposed with the name ```lastModifiedDateTime```. If you choose a different name, then the webhook functionality will not work properly.
|
||||||
|
|
||||||
|
|
@ -179,8 +179,8 @@ layout
|
||||||
{
|
{
|
||||||
repeater(records)
|
repeater(records)
|
||||||
{
|
{
|
||||||
field(id; SystemId) { }
|
field(id; Rec.SystemId) { }
|
||||||
field(lastModifiedDateTime; SystemModifiedAt) { }
|
field(lastModifiedDateTime; Rec.SystemModifiedAt) { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ When `begin` follows `then`, `else`, `do`, it should be on the same line, preced
|
||||||
```al
|
```al
|
||||||
if ICPartnerRefType = ICPartnerRefType::"Common Item No." then
|
if ICPartnerRefType = ICPartnerRefType::"Common Item No." then
|
||||||
begin
|
begin
|
||||||
...
|
...
|
||||||
end;
|
end;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -23,7 +23,6 @@ When `begin` follows `then`, `else`, `do`, it should be on the same line, preced
|
||||||
|
|
||||||
```al
|
```al
|
||||||
if ICPartnerRefType = ICPartnerRefType::"Common Item No." then begin
|
if ICPartnerRefType = ICPartnerRefType::"Common Item No." then begin
|
||||||
...
|
...
|
||||||
end;
|
end;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ Only use begin..end to enclose [compound statements](https://docs.microsoft.com/
|
||||||
```AL
|
```AL
|
||||||
if FindSet() then begin
|
if FindSet() then begin
|
||||||
repeat
|
repeat
|
||||||
...
|
...
|
||||||
until next() = 0;
|
until next() = 0;
|
||||||
end;
|
end;
|
||||||
```
|
```
|
||||||
|
|
@ -23,7 +23,7 @@ end;
|
||||||
```AL
|
```AL
|
||||||
if FindSet() then
|
if FindSet() then
|
||||||
repeat
|
repeat
|
||||||
...
|
...
|
||||||
until next() = 0;
|
until next() = 0;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -52,4 +52,3 @@ if X then begin
|
||||||
end else
|
end else
|
||||||
(not X)
|
(not X)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,20 +8,20 @@ _Created by Microsoft, Described by waldo_
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
Do not start a line with a binary operator.
|
Do not start a line with a binary operator.
|
||||||
|
|
||||||
## Bad code
|
## Bad code
|
||||||
|
|
||||||
```AL
|
```AL
|
||||||
"Quantity to Ship" :=
|
"Quantity to Ship" :=
|
||||||
Quantity
|
Quantity
|
||||||
- "Quantity Shipped"
|
- "Quantity Shipped"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Good code
|
## Good code
|
||||||
|
|
||||||
```AL
|
```AL
|
||||||
"Quantity to Ship" :=
|
"Quantity to Ship" :=
|
||||||
Quantity -
|
Quantity -
|
||||||
"Quantity Shipped"
|
"Quantity Shipped"
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -15,11 +15,11 @@ The `end else` pair should always appear on the same line.
|
||||||
```al
|
```al
|
||||||
if OppEntry.Find('-') then
|
if OppEntry.Find('-') then
|
||||||
if SalesCycleStage.Find('-') then begin
|
if SalesCycleStage.Find('-') then begin
|
||||||
...
|
...
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
...
|
...
|
||||||
end;
|
end;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -28,8 +28,8 @@ The `end else` pair should always appear on the same line.
|
||||||
```al
|
```al
|
||||||
if OppEntry.Find('-') then
|
if OppEntry.Find('-') then
|
||||||
if SalesCycleStage.Find('-') then begin
|
if SalesCycleStage.Find('-') then begin
|
||||||
...
|
...
|
||||||
end else begin
|
end else begin
|
||||||
...
|
...
|
||||||
end;
|
end;
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -8,20 +8,20 @@ _Created by Microsoft, Described by waldo_
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
`if` and `else` statements should be on separate lines.
|
`if` and `else` statements should be on separate lines.
|
||||||
|
|
||||||
## Bad code
|
## Bad code
|
||||||
|
|
||||||
```al
|
```al
|
||||||
if Atom = '\>' then HasLogicalOperator := true else begin
|
if Atom = '>' then HasLogicalOperator := true else begin
|
||||||
...
|
...
|
||||||
end;
|
end;
|
||||||
```
|
```
|
||||||
|
|
||||||
## Good code
|
## Good code
|
||||||
|
|
||||||
```al
|
```al
|
||||||
if Atom = '\>' then
|
if Atom = '>' then
|
||||||
HasLogicalOperator := true
|
HasLogicalOperator := true
|
||||||
else begin
|
else begin
|
||||||
...
|
...
|
||||||
|
|
|
||||||
|
|
@ -13,31 +13,31 @@ There must be exactly one space character on each side of a binary operator such
|
||||||
## Bad code
|
## Bad code
|
||||||
|
|
||||||
```al
|
```al
|
||||||
"Line Discount %" := "Line Discount Amount"/"Line Value"*100;
|
"Line Discount %" := "Line Discount Amount"/"Line Value"*100;
|
||||||
```
|
```
|
||||||
|
|
||||||
## Good code
|
## Good code
|
||||||
|
|
||||||
```al
|
```al
|
||||||
"Line Discount %" := "Line Discount Amount" / "Line Value" * 100;
|
"Line Discount %" := "Line Discount Amount" / "Line Value" * 100;
|
||||||
```
|
```
|
||||||
|
|
||||||
## Bad code
|
## Bad code
|
||||||
|
|
||||||
```al
|
```al
|
||||||
StartDate := CalcDate('<+'+Format(Days+i)+'D\>',StartDate);
|
StartDate := CalcDate('<+'+Format(Days+i)+'D\>',StartDate);
|
||||||
```
|
```
|
||||||
|
|
||||||
## Good code
|
## Good code
|
||||||
|
|
||||||
```al
|
```al
|
||||||
StartDate := CalcDate('<+' + Format(Days + i) + 'D\>', StartDate);
|
StartDate := CalcDate('<+' + Format(Days + i) + 'D\>', StartDate);
|
||||||
```
|
```
|
||||||
|
|
||||||
## Bad code
|
## Bad code
|
||||||
|
|
||||||
```al
|
```al
|
||||||
StartDate:=0D; // Initialize
|
StartDate:=0D; // Initialize
|
||||||
```
|
```
|
||||||
|
|
||||||
## Good code
|
## Good code
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue