Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/docs/BestPractices/SubscriberCodeunits/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ If possible, only execute the subscriber when really necessary by using Manual B
```AL
//subscriber - code should actually only run when Color=Red.
[EventSubscriber(ObjectType::Table, Database::"Just Some Table WLD", 'OnAfterValidateEvent', 'Message 2', false, false)]
local procedure JustDoSomthing(var Rec: Record "Just Some Table WLD"; var xRec: Record "Just Some Table WLD")
local procedure JustDoSomething(var Rec: Record "Just Some Table WLD"; var xRec: Record "Just Some Table WLD")
begin
if Rec.color <> 'RED' then
exit; //only execute when necessary
Expand Down
2 changes: 1 addition & 1 deletion content/docs/patterns/command-queue/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The goal of this pattern is to control the flow of multiple processes


## Problem
Sometimes its neccassary to perform multiple processes in Business Central, for example you want to post more than one order or before you post an Order you also have to post a purchase order this often leads to spaghetti code with big if else structures, which is not easy to read
Sometimes its necessary to perform multiple processes in Business Central, for example you want to post more than one order or before you post an Order you also have to post a purchase order this often leads to spaghetti code with big if else structures, which is not easy to read

## Description
The pattern is ideal for executing several independent processes in succession. Since the processes are independent, each process must take care of error handling itself.
Expand Down
2 changes: 1 addition & 1 deletion content/docs/patterns/error-handling/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The "Error Handling" system is used extensively to provide information to users
## Description
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.

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.
The Microsoft Learn part is about collecting errors which means that the process you did start will not be interrupted 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.

The youtube video shows more about errors presented in such way that the user will be informed about how to solve the error.

Expand Down
2 changes: 1 addition & 1 deletion content/docs/patterns/event-bridge-pattern/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ interface "IScale"
Multiple apps can subscribe to certain events of the app.
When a new implementation is created, we need to make sure that these events are raised at the right times. If those events were published on the implementation codeunit, it might very well be that those events will not be raised, hard to find, or whatever.

So, if we would implement it like this, it isn't really extensible, as a different implemention would implement different events .. and it's not possible to subscribe to all of them (including future implementations)
So, if we would implement it like this, it isn't really extensible, as a different implementation would implement different events .. and it's not possible to subscribe to all of them (including future implementations)

```AL
codeunit 50407 "Scale Wrong" implements IScale
Expand Down
2 changes: 1 addition & 1 deletion content/docs/patterns/template-method-pattern/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ As you can see in this example the readability gets worse with every new case.
To implement the Pattern you need at least 3 objects:
- A template codeunit
- An Interface which provides the needed procedures
- A codeunit which Implements the interrface
- A codeunit which Implements the interface

In my example I show how to implement a data export with templating.

Expand Down